[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can't set conditional break point using AREF/NILP
From: |
Sean Whitton |
Subject: |
Can't set conditional break point using AREF/NILP |
Date: |
Sat, 01 Jan 2022 14:49:05 -0700 |
User-agent: |
Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
[moving to emacs-devel]
On Sat 01 Jan 2022 at 08:56AM +02, Eli Zaretskii wrote:
>> From: Sean Whitton <spwhitton@spwhitton.name>
>> Date: Fri, 31 Dec 2021 17:30:35 -0700
>>
>> If I might ask a gdb question: to try to determine when this code can
>> set FONT_WEIGHT_INDEX to nil, I set a breakpoint right after it and then
>> tried
>>
>> condition NN NILP (AREF (entity, FONT_WEIGHT_INDEX))
>>
>> but this didn't work -- is it possible to do something like that?
>
> It should be possible if your Emacs was compiled with -g3.
Can confirm mine is.
> Perhaps try
>
> condition NN AREF (entity, FONT_WEIGHT_INDEX) == Qnil
>
> instead.
This fails in the same way. This is what I see:
Breakpoint 2 at 0x335d30: file ftfont.c, line 231.
(gdb) condition 2 AREF (entity, FONT_WEIGHT_INDEX) == Qnil
(gdb) r
`/home/spwhitton/src/emacs/src/emacs' has changed; re-reading symbols.
Starting program: /home/spwhitton/src/emacs/src/emacs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff15c4700 (LWP 2073615)]
[New Thread 0x7ffff0bca700 (LWP 2073616)]
[New Thread 0x7fffebfff700 (LWP 2073617)]
[New Thread 0x7fffeb254700 (LWP 2073618)]
[New Thread 0x7fffea8c3700 (LWP 2073619)]
[New Thread 0x7fffe9f32700 (LWP 2073620)]
Error in testing breakpoint condition:
Couldn't get registers: No such process.
An error occurred while in a function called from GDB.
Evaluation of the expression containing the function
(AREF) will be abandoned.
When the function is done executing, GDB will silently stop.
Selected thread is running.
(gdb) [Switching to thread 1 (Thread 0x7ffff237b040 (LWP 2073608))]
#0 ftfont_pattern_entity (p=0x55555643d660, extra=XIL(0x555555f91953)) at
ftfont.c:230
230 if (FcPatternGetInteger (p, FC_SLANT, 0, &numeric) == FcResultMatch)
And then gdb does break at the break point, but it's badly broken:
(gdb) p AREF (entity, FONT_WEIGHT_INDEX) == Qnil
[Thread 0x7fffea8c3700 (LWP 2073619) exited]
[Thread 0x7fffe9f32700 (LWP 2073620) exited]
Attempt to take address of value not located in memory.
(gdb)
--
Sean Whitton
- Can't set conditional break point using AREF/NILP,
Sean Whitton <=