[OT - gdb-specific] Re: Print variable with gdb??
Date: Wed, 30 Mar 2005 00:01:55 GMT
"JS" <firstname.lastname@example.org> wrote in message
> I have:
> int p = 5;
> when I debug my code I would like to get a print of p's
> value therefore I start gdb and type:
> print p
> but then I get an error that the variable does not exists!
> Hope someone can help!
Things to check:
* Compiled with -g switch
* Correct file name [correct case, and extension if any]
specified e.g. gdb myFile.exe, and file is loaded i.e. the
preamble display appears
* Symbol file has been loaded i.e. it has not been been
deleted [should say so on preamble display]
* Set breakpoint at 'main' e.g. after loading file, issue:
* In 'stepping through' the executable you are currently
in a context in which 'i' exists i.e. it is in scope
You may wish to access the 'man' page documention ['man gdb'], or the 'help'
command within gdb, or perhaps search for a gdb tutorial, for more
I hope this helps.
- kgdb cleanups
... -platforms with the kgdb option may behave in a similar fashion. ... the thread info command and gdb now seems to ask when needed. ... -#define COMMA, ...
- [UNIX] Lukemftpd (Tnftpd) Multiple Vulnerabilities May Lead To Remote Code Execution
... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... structure tab to indicate if it's acceptable for a command to occur in OOB ... delivering of ABOR and STAT commands in OOB mode. ...
- Re: SIGINT for Emacs/gdb in a terminal and background processes
... Ctrl-C in gdb, both emacs and xterm are killed, though the Ctrl-C ... Ctrl-G (which is used to interrupt an Emacs command, ... commands it starts are therefore in the foreground process group. ...
- Re: Remote Flashing w/ Window Client & OpenOCD
... Telnet interface is not as easy as GDB. ... the remote client dumps into the target memory directly. ... is trigger a copy from memory to flash. ... a write command as well as a erase command. ...
- Re: Apple security FAIL
... When are Apple going to get a clue about security? ... There is a related issue to do with the command line "printf" tool: ... cleanly via gdb. ...