[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DEBUG file needs updating
From: |
Eli Zaretskii |
Subject: |
Re: DEBUG file needs updating |
Date: |
Sun, 12 Dec 2004 22:42:08 +0200 |
> From: Nick Roberts <address@hidden>
> Date: Mon, 13 Dec 2004 01:24:35 +1300
>
> 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.
Hold your horses. NEWS goes on to say:
GDB> Most compilers don't include information about macros in the debugging
GDB> information by default. In GCC 3.1, for example, you need to compile
GDB> your program with the options `-gdwarf-2 -g3'.
So, while etc/DEBUG should mention that newer versions of GCC might
know about XVECTOR etc., it should add that this is only true on some
platforms (those which support DWARF-2 debug info), and other
compilers might be lacking this feature altogether.
Thus, the commands in .gdbinit are far from being irrelevant.
> 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.
The example wants to set a breakpoint on some line inside the
function, not at the first executable line. So how would like to
change the example to prevent it from bitrotting?