From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: [commit] [PATCH 4/6] infcall: stop_registers -> register_dummy_frame_dtor
Date: Wed, 13 May 2015 18:54:00 -0000 [thread overview]
Message-ID: <20150513185433.GC28303@host1.jankratochvil.net> (raw)
In-Reply-To: <55535188.1070900@redhat.com>
On Wed, 13 May 2015 15:28:40 +0200, Pedro Alves wrote:
> On 05/08/2015 09:21 PM, Jan Kratochvil wrote:
> > I am not completely sure what is right for bpfinishpy_pre_stop_hook but the
> > testsuite passes. I can think more about it if it gets otherwise approved.
>
> Yeah, if the Python API around that gives access the return value,
> then something needs to be done there, otherwise, probably nothing else
> is needed.
It does not, see bottom of the mail, so I have just put there:
/* bpfinishpy_init cannot finish into DUMMY_FRAME (throws an error
in such case) so it is OK to always pass CTX_SAVER as NULL. */
struct value *ret = get_return_value (function, value_type, NULL);
> > +/* Destructor for associated dummy_frame. */
> > +
> > +static dummy_frame_dtor_ftype call_function_by_hand_dtor;
>
> This forward declaration is not really necessary, right?
> A wrong prototype mismismatch would be caught here:
Yes, it would. I think it could be there but I have removed it.
> How about we rename things,
I have renamed it by your patch, I agree the new naming is better.
Checked in:
8a6c40311297f60ad13827650fdde13da301b505
Thanks,
Jan
------------------------------------------------------------------------------
(gdb) l
1 long f(void) { return 1234567890123456789; }
2 int main(void) { return 0; }
(gdb) start
(gdb) b f
Breakpoint 2 at 0x4004fa: file 1.c, line 1.
(gdb) bt
#0 main () at 1.c:2
(gdb) p f()
Breakpoint 2, f () at 1.c:1
1 long f(void) { return 1234567890123456789; }
The program being debugged stopped while in a function called from GDB.
Evaluation of the expression containing the function
(f) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb) bt
#0 f () at 1.c:1
#1 <function called from gdb>
#2 main () at 1.c:2
(gdb) fini
Run till exit from #0 f () at 1.c:1
Value returned is $1 = 1234567890123456789
(gdb) bt
#0 main () at 1.c:2
(gdb) p f()
Breakpoint 2, f () at 1.c:1
1 long f(void) { return 1234567890123456789; }
The program being debugged stopped while in a function called from GDB.
Evaluation of the expression containing the function
(f) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb) bt
#0 f () at 1.c:1
#1 <function called from gdb>
#2 main () at 1.c:2
(gdb) python gdb.FinishBreakpoint()
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: "FinishBreakpoint" cannot be set on a dummy frame.
Error while executing Python code.
(gdb) _
next prev parent reply other threads:[~2015-05-13 18:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 20:21 [PATCH 1/6] dummy_frame_dtor_ftype vs. call_function_by_hand_dummy_dtor_ftype cleanup Jan Kratochvil
2015-05-08 20:21 ` [PATCH 3/6] register_dummy_frame_dtor: Permit multiple dtors Jan Kratochvil
2015-05-13 13:00 ` Pedro Alves
2015-05-13 19:50 ` [commit] " Jan Kratochvil
2015-05-08 20:21 ` [PATCH 4/6] infcall: stop_registers -> register_dummy_frame_dtor Jan Kratochvil
2015-05-13 13:28 ` Pedro Alves
2015-05-13 18:54 ` Jan Kratochvil [this message]
2015-05-08 20:21 ` [PATCH 2/6] Call dummy_frame_dtor_ftype also from remove_dummy_frame Jan Kratochvil
2015-05-13 12:57 ` Pedro Alves
2015-05-13 13:52 ` Jan Kratochvil
2015-05-13 18:53 ` [commit] " Jan Kratochvil
2015-05-08 20:21 ` [PATCH 5/6] Remove stop_registers Jan Kratochvil
2015-05-13 13:10 ` Pedro Alves
2015-05-13 18:55 ` [commit] " Jan Kratochvil
2015-05-08 20:22 ` [PATCH 6/6] Make regcache_cpy_no_passthrough static Jan Kratochvil
2015-05-13 13:16 ` Pedro Alves
2015-05-13 19:49 ` [commit] " Jan Kratochvil
2015-05-13 12:55 ` [PATCH 1/6] dummy_frame_dtor_ftype vs. call_function_by_hand_dummy_dtor_ftype cleanup Pedro Alves
2015-05-13 13:56 ` [commit] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150513185433.GC28303@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).