This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [i386newframe] New branch


Per Andrews suggestion, I just created a new branch, and checked in
the attached on it.  This stuff works for me on
i386-unknown-freebsd4.7.  Interix and x86-64 are almost certainly
broken on the branch.  Let's fix those targets and merge this into
mainline when Andrew is finished diddling with the interfaces :-).

s/diddling/deleting/


+{
+  /* FIXME: kettenis/20030302: I don't understand why the cache isn't
+     already initialized.  */
+  struct i386_frame_cache *cache = i386_frame_cache (frame, cachep);
+

On the branch, while the frame code notionally uses the sequence:


	pc = frame_pc_unwind(next);
	id = frame_id_unwind(next);

it expands to:

prev->pc = next->unwind->prev_register (next->next, &next->prologue_cache, PC_REGNUM);
prev->id = prev->unwind->this_id (next, &prev->prologue_cache);


So while the PC is unwound first, it is the ID unwind call that is first to see prev's uninitialized prologue cache.

Thinking about it, the new frame's PC can be determined solely from unwound register values. For the ID, however, the prev's frame's prologue first needs to be examined to determine, for instance, which register from the next frame needs to be unwound.

(the mainline doesn't do this).

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]