This is the mail archive of the gdb-patches@sourceware.org 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: [RFA] fix thinko in arm-tdep.c arm_stub_unwind_sniffer


On Thu, Mar 4, 2010 at 5:49 AM, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Wed, Mar 03, 2010 at 06:05:23PM -0800, Doug Evans wrote:
>> Hi.
>>
>> Ok to check in?
>>
>> [The result is a boolean indicating success, so why call
>> target_read_memory if in_plt_section failed, and why return non-zero
>> if target_read_memory failed?]
>
> No, it's correct. ?We want to use the stub unwinder if we are in the
> PLT. ?We also want to use the stub unwinder if the PC points at an
> unreadable address, because the prologue unwinder would try to read
> code from pc. ?Did this cause a problem?

I see.
It didn't cause a problem per se.  On android, signal frames were
being caught by the stub unwinder (need to fix the signal frame
sniffer), and didn't know this dual purpose of the stub unwinder.
Seems a bit odd, but ok.

I checked this in instead.

2010-03-04  Doug Evans  <dje@google.com>

        * arm-tdep.c (arm_stub_unwind_sniffer): Add comment.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.298
diff -u -p -r1.298 arm-tdep.c
--- arm-tdep.c  4 Mar 2010 13:42:12 -0000       1.298
+++ arm-tdep.c  4 Mar 2010 16:24:54 -0000
@@ -1236,6 +1236,8 @@ arm_stub_unwind_sniffer (const struct fr

   addr_in_block = get_frame_address_in_block (this_frame);
   if (in_plt_section (addr_in_block, NULL)
+      /* We also use the stub winder if the target memory is unreadable
+        to avoid having the prologue unwinder trying to read it.  */
       || target_read_memory (get_frame_pc (this_frame), dummy, 4) != 0)
     return 1;


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