Devel:...wLevel(3pm)
β¨ 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
STDINis a tty, we can have the inferior process communicate directly with the controlling tty (emulating the default behavior ofgdb):
$gdb = new Devel::GDB::LowLevel( '-execfile' => $path_to_gdb,
'-params' => $extra_gdb_params );
- Or, we can create an
Expectobject 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 theExpectobject created in the constructor. Dies if'-create-expect'was not passed tonew. πinterruptβ sendSIGINTto 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 AND LICENSE π
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
- debian bookworm: libdevel-gdb-perl 2.02-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdevel-gdb-perl 2.02-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdevel-gdb-perl 2.02-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdevel-gdb-perl 2.02-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdevel-gdb-perl 2.02-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms