* Re: gdb doc
@ 2007-03-22 12:50 A Soare
0 siblings, 0 replies; 4+ messages in thread
From: A Soare @ 2007-03-22 12:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs Help [help-gnu-emacs], Emacs Dev [emacs-devel]
> > I do not find in documentation how can I set a condition for gdb to stop to a breakpoint in Feval when such a condition is accomplished:
> >
> > 1. lisp function name that is evaluated is "+".
>
> Compare the car of the Feval's argument with Qplus.
I tried t
(gdb) br Feval
Breakpoint 3 at 0x8152849: file eval.c, line 2205.o do so:
(gdb) r
Starting program: /mnt/gnu/emacs/src/emacs -geometry 80x40+0+0
[Thread debugging using libthread_db enabled]
[New Thread -1208109376 (LWP 2650)]
[Switching to Thread -1208109376 (LWP 2650)]
Breakpoint 4 at 0x80c88e6: file xterm.c, line 7859.
Breakpoint 3, Feval (form=139269229) at eval.c:2205
(gdb) p form
$1 = 139269229
(gdb) xcar form
$2 = 0x8540b91
Now I wish to do
(gdb) commands
and here I do not know how to write CONDITION in
if <CONDITION>
break
end
continue
end
Can you help me a little mode to write the condition please?
Finally I got it alone...
Alin Soare
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb doc
@ 2007-03-23 14:51 A Soare
0 siblings, 0 replies; 4+ messages in thread
From: A Soare @ 2007-03-23 14:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs Help [help-gnu-emacs]
> and here I do not know how to write CONDITION in
>
> if <CONDITION>
> break
No, you need to say "break Feval if <CONDITION>".
> Can you help me a little mode to write the condition please?
I don't have time to write and test a complete script, sorry. You
will need to look in lisp.h for the definition of the XCAR macro, or
in src/.gdbinit for the definition of `xcar', and use the same
expressions in the condition. Something like the following
(untested!):
break Feval if ((struct Lisp_Cons *) ((gdb_use_union ? form.u.val : form & $valmask) | gdb_data_seg_bits))->car == Qplus
Thanks a lot.
Alin Soare.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb doc
@ 2007-03-22 11:59 A Soare
2007-03-23 13:04 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: A Soare @ 2007-03-22 11:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Emacs Help [help-gnu-emacs], Emacs Dev [emacs-devel]
> > I do not find in documentation how can I set a condition for gdb to stop to a breakpoint in Feval when such a condition is accomplished:
> >
> > 1. lisp function name that is evaluated is "+".
>
> Compare the car of the Feval's argument with Qplus.
I tried t
(gdb) br Feval
Breakpoint 3 at 0x8152849: file eval.c, line 2205.o do so:
(gdb) r
Starting program: /mnt/gnu/emacs/src/emacs -geometry 80x40+0+0
[Thread debugging using libthread_db enabled]
[New Thread -1208109376 (LWP 2650)]
[Switching to Thread -1208109376 (LWP 2650)]
Breakpoint 4 at 0x80c88e6: file xterm.c, line 7859.
Breakpoint 3, Feval (form=139269229) at eval.c:2205
(gdb) p form
$1 = 139269229
(gdb) xcar form
$2 = 0x8540b91
Now I wish to do
(gdb) commands
and here I do not know how to write CONDITION in
if <CONDITION>
break
end
continue
end
Can you help me a little mode to write the condition please?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb doc
2007-03-22 11:59 A Soare
@ 2007-03-23 13:04 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2007-03-23 13:04 UTC (permalink / raw)
To: emacs-devel, help-gnu-emacs
> From: A Soare <alinsoar@voila.fr>
> Cc: "Emacs Dev [emacs-devel]" <emacs-devel@gnu.org>,
> "Emacs Help [help-gnu-emacs]" <help-gnu-emacs@gnu.org>
> Date: Thu, 22 Mar 2007 12:59:11 +0100 (CET)
>
> Breakpoint 3, Feval (form=139269229) at eval.c:2205
> (gdb) p form
> $1 = 139269229
> (gdb) xcar form
> $2 = 0x8540b91
>
> Now I wish to do
>
> (gdb) commands
>
> and here I do not know how to write CONDITION in
>
> if <CONDITION>
> break
No, you need to say "break Feval if <CONDITION>".
> Can you help me a little mode to write the condition please?
I don't have time to write and test a complete script, sorry. You
will need to look in lisp.h for the definition of the XCAR macro, or
in src/.gdbinit for the definition of `xcar', and use the same
expressions in the condition. Something like the following
(untested!):
break Feval if ((struct Lisp_Cons *) ((gdb_use_union ? form.u.val : form & $valmask) | gdb_data_seg_bits))->car == Qplus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-23 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-22 12:50 gdb doc A Soare
-- strict thread matches above, loose matches on Subject: below --
2007-03-23 14:51 A Soare
2007-03-22 11:59 A Soare
2007-03-23 13:04 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).