GNU bug report logs -
#23424
better error reporting when package archives have issues
Previous Next
Full log
Message #54 received at 23424 <at> debbugs.gnu.org (full text, mbox):
> From: Kaushal Modi <kaushal.modi <at> gmail.com>
> Date: Mon, 02 May 2016 22:05:50 +0000
> Cc: 23424 <at> debbugs.gnu.org
>
> I have a followup gdb 101 question:
>
> I thought I would improve the debug capability by adding the flags "--enable-checking='yes,glyphs'
> --enable-check-lisp-object-type" to ./configure as per etc/DEBUG. I did not have those 2 flags earlier. But after
> rebuilding using the suggested options, the conditional breakpoints do not work. I also noticed that earlier "p
> error_symbol" gave something like,
>
> $1 = 41328
>
> Now it gives something like,
>
> $1 = {
> i = 41328
> }
The --enable-check-lisp-object-type changes the representation of Lisp
objects, so that they are no longer represented by C integers.
Instead, they are represented by a structure with a single integer
member. From src/lisp.h:
#ifdef CHECK_LISP_OBJECT_TYPE
typedef struct { EMACS_INT i; } Lisp_Object;
[...]
#else /* CHECK_LISP_OBJECT_TYPE */
[...]
typedef EMACS_INT Lisp_Object;
#endif
So instead of
(gdb) condition 3 error_symbol != 41328
you should say something like
(gdb) condition 3 error_symbol.i != 41328
> Also, when earlier I saw:
>
> Breakpoint 3, Fsignal (error_symbol=19056, data=16197139) at eval.c:1471
>
> , now I see instead:
>
> Breakpoint 3, Fsignal (error_symbol=..., data=...) at eval.c:1471
>
> (those numbers for error_symbol and data are literally replaced with "...")
By default, GDB doesn't display non-scalar arguments to functions when
it shows stack frames. It displays ellipses for any non-scalar
argument. You can change that with
(gdb) set print frame-arguments all
Or just type
(gdb) p error_symbol
etc. for any argument whose value you want to see; the ellipsis only
affects the values of arguments in frame display.
As yet another alternative, you can ask GDB to do that automatically
when it stops at a breakpoint:
(gdb) commands 3
> p error_symbol
> xsymbol
> end
And that concludes your lesson #2. Reading the relevant sections of
the GDB manual is optional; suggested reading:
(info "(gdb) Print Settings")
(info "(gdb) Break Commands")
This bug report was last modified 9 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.