[commit] New method find_frame_sal()

Andrew Cagney ac131313@redhat.com
Thu Nov 28 17:51:00 GMT 2002


Hello,

While cleaning up accesses to the `struct frame_info', I kept coming 
across code snippits like:

  sal = find_pc_line (fi->pc,
                      (fi->next != (struct frame_info *) NULL
                       && !(get_frame_type (fi->next) == SIGTRAMP_FRAME)
                       && !(get_frame_type (fi->next) == DUMMY_FRAME)));

(Originally it was worse, as there was also fi->signal_handler_caller 
and PC_IN_CALL_DUMMY (fi->pc, fi->frame, fi->frame).)

The attached patch adds the function:

	find_frame_sal(fi, &sal);

that encapsulates all of the above.

The sole motivation for this being to eliminate all those frame pointer 
dereferences.

committed,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20021128/6c107840/attachment.ksh>


More information about the Gdb-patches mailing list