This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc] Add a sentinel frame
- From: Michal Ludvig <mludvig at suse dot cz>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Thu, 06 Mar 2003 17:00:07 +0100
- Subject: Re: [patch/rfc] Add a sentinel frame
- Organization: SuSE CR
- References: <3E305670.3020700@redhat.com> <3E48378E.6090007@suse.cz> <3E492953.8010001@redhat.com> <3E52173B.1030800@suse.cz> <3E538770.6070209@redhat.com> <3E5B98D8.3030002@suse.cz> <3E5BAB7D.8090801@redhat.com> <3E5BD957.9010605@suse.cz> <3E5BDCBD.2030205@redhat.com> <3E5C7512.2080207@suse.cz> <3E5E58FC.3080704@redhat.com> <3E5F5DEE.3030505@suse.cz> <3E5F8559.1020708@redhat.com> <3E663605.6030105@suse.cz> <3E664100.4010009@redhat.com>
Andrew Cagney wrote:
This method needs to unwind register value's from the NEXT_FRAME and
then use that to determine the dummy frame's ID. The d10v's
implementation (not yet committed) looks like:
So could that be something like this? So far it works pretty well...
+static void
+x86_64_save_dummy_frame_tos (CORE_ADDR sp)
+{
+ /* We must add the size of the return address that is already
+ put on the stack. */
+ generic_save_dummy_frame_tos (sp + sizeof(CORE_ADDR));
+}
+
+struct frame_id
+x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+ struct frame_id id;
+
+ id.pc = frame_pc_unwind (frame);
+ frame_unwind_unsigned_register (frame, SP_REGNUM, &id.base);
+
+ return id;
+}
+
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig at suse dot cz
* (+420) 296.545.373 * http://www.suse.cz