[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DEBUG file needs updating
From: |
Nick Roberts |
Subject: |
DEBUG file needs updating |
Date: |
Mon, 13 Dec 2004 01:24:35 +1300 |
The DEBUG file says:
DEBUG> XVECTOR (this_command_keys)->contents[this_command_key_count++] = key;
DEBUG> XVECTOR is a macro, and therefore GDB does not know about it.
DEBUG> GDB cannot evaluate "p XVECTOR (this_command_keys)".
This is no longer true as of GDB 5.3 and GCC 3.1 (both probably about two
years old). The NEWS entry for GDB says:
GDB> * GDB now supports C/C++ preprocessor macros.
GDB> GDB now expands preprocessor macro invocations in C/C++ expressions,
GDB> and provides various commands for showing macro definitions and how
GDB> they expand.
This is invaluable to someone who is just starting to look at the C code
and makes many of the functions defined in .gdbinit irrelevant (assuming
the appropriate GDB and GCC are available). It just requires that the code
is compiled with "-g3".
One smaller point, the example sets a breakpoint at line 1296 of xmenu.c
which clearly has changed now. If it sets a breakpoint on a procedure name
rather than a line number it might be correct for longer.
Nick
- DEBUG file needs updating,
Nick Roberts <=