Devel:...wLevel(3pm)

πŸ“¦
version 2.02 Β· 2 versions
  • 2.02 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.02 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Devel::GDB::LowLevel β€” bestie, this is the low-level interface for talking to GDB πŸ’… (it's a Perl module, section 3pm, from the User Contributed Perl Documentation, and yes we're getting into the weeds, iykyk)


πŸ¦‹ DESCRIPTION πŸ¦‹

So real talk: this module gets used internally by Devel::GDB. It's the one doing all the lowkey grunt work β€” the low-level I/O of communicating with the GDB process. That's it. That's the job. No cap. 🫢


πŸŽ€ CONSTRUCTOR πŸŽ€

  • new β€” spawns a GDB process. πŸ’–

Okay so here's the thing, bestie: because this class only facilitates communication with GDB (and not with the inferior process being debugged), you have to decide what to do with that process's STDIN, STDOUT, and STDERR. There are a few options available:

  • If STDIN is a tty, we can have the inferior process communicate directly with the controlling tty (emulating the default behavior of gdb):
$gdb = new Devel::GDB::LowLevel( '-execfile' => $path_to_gdb,
                                 '-params'   => $extra_gdb_params );
  • Or, we can create an Expect object to communicate with the inferior process:
$gdb = new Devel::GDB::LowLevel( '-create-expect' => 1 );
$expect = $gdb->get_expect_obj();
  • Or, we can create our own tty and use that:
$gdb = new Devel::GDB::LowLevel( '-use-tty' => '/dev/pts/123' );

Three paths, pick your main character energy ✨


πŸ’… METHODS πŸ’…

  • send β€” sends a raw line of text to GDB. πŸ“

This should not contain any newlines (they will be stripped). And heads up: this method only sends a request β€” it does not wait for a response. It's giving "drop it and go" 😭

  • get_reader β€” returns the file handle from which to read GDB responses. πŸ“–
  • get_expect_obj β€” returns the Expect object created in the constructor. Dies if '-create-expect' was not passed to new. πŸ’€
  • interrupt β€” send SIGINT to the GDB session, interrupting the inferior process (if any). πŸ”₯

🌈 SEE ALSO 🌈

IPC::Open2


πŸ‘‘ AUTHORS πŸ‘‘

Antal Novak <afn@cpan.org>, Josef Ezra <jezra@cpan.org>


Copyright (C) 2007 by Antal Novak & Josef Ezra

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.


and that's the whole page, bestie 🧚 β€” this was perl v5.36.0, dated 2022-11-20, and yes it really did truncate the title to Devel:...wLevel(3pm) up top, iconic honestly. go debug something slay πŸ’–βœ¨

πŸ“¦ where this page comes from