* [RFA] Bail out of Thumb unwinding if there is no symbol
@ 2006-02-20 21:45 Daniel Jacobowitz
2006-02-21 10:26 ` Richard Earnshaw
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-02-20 21:45 UTC (permalink / raw)
To: gdb-patches; +Cc: Richard Earnshaw
If find_pc_partial_function fails, prologue_start won't have been
initialized. The previous effect of this code was to try to disassemble at
0 (by luck, the variable was unset). This patch just stops unwinding when
we're stuck in a Thumb function without a symbol.
The astute may notice that it's a bit tricky to get to this situation
with current GDB; if we don't have symbols, how do we know that we're
Thumb? Well, there's a couple ways to do it, including another
patch that I'm about to post.
This seems like an improvement over the current situation. Lightly tested;
OK?
--
Daniel Jacobowitz
CodeSourcery
2006-02-20 Daniel Jacobowitz <dan@codesourcery.com>
* arm-tdep.c (thumb_scan_prologue): Don't try to analyze
the function at zero if we have no symbols.
Index: src/gdb/arm-tdep.c
===================================================================
--- src.orig/gdb/arm-tdep.c 2006-02-20 16:11:02.000000000 -0500
+++ src/gdb/arm-tdep.c 2006-02-20 16:34:39.000000000 -0500
@@ -468,9 +468,9 @@ thumb_scan_prologue (CORE_ADDR prev_pc,
prologue_end = sal.end; /* (probably means no prologue) */
}
else
- /* We're in the boondocks: allow for
- 16 pushes, an add, and "mv fp,sp". */
- prologue_end = prologue_start + 40;
+ /* We're in the boondocks: we have no idea where the start of the
+ function is. */
+ return;
prologue_end = min (prologue_end, prev_pc);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Bail out of Thumb unwinding if there is no symbol
2006-02-20 21:45 [RFA] Bail out of Thumb unwinding if there is no symbol Daniel Jacobowitz
@ 2006-02-21 10:26 ` Richard Earnshaw
2006-03-30 17:15 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2006-02-21 10:26 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Mon, 2006-02-20 at 21:42, Daniel Jacobowitz wrote:
> If find_pc_partial_function fails, prologue_start won't have been
> initialized. The previous effect of this code was to try to disassemble at
> 0 (by luck, the variable was unset). This patch just stops unwinding when
> we're stuck in a Thumb function without a symbol.
>
> The astute may notice that it's a bit tricky to get to this situation
> with current GDB; if we don't have symbols, how do we know that we're
> Thumb? Well, there's a couple ways to do it, including another
> patch that I'm about to post.
>
> This seems like an improvement over the current situation. Lightly tested;
> OK?
OK.
R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Bail out of Thumb unwinding if there is no symbol
2006-02-21 10:26 ` Richard Earnshaw
@ 2006-03-30 17:15 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-03-30 17:15 UTC (permalink / raw)
To: gdb-patches
On Tue, Feb 21, 2006 at 10:00:48AM +0000, Richard Earnshaw wrote:
> On Mon, 2006-02-20 at 21:42, Daniel Jacobowitz wrote:
> > If find_pc_partial_function fails, prologue_start won't have been
> > initialized. The previous effect of this code was to try to disassemble at
> > 0 (by luck, the variable was unset). This patch just stops unwinding when
> > we're stuck in a Thumb function without a symbol.
> >
> > The astute may notice that it's a bit tricky to get to this situation
> > with current GDB; if we don't have symbols, how do we know that we're
> > Thumb? Well, there's a couple ways to do it, including another
> > patch that I'm about to post.
> >
> > This seems like an improvement over the current situation. Lightly tested;
> > OK?
>
> OK.
Thanks, committed.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-30 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-20 21:45 [RFA] Bail out of Thumb unwinding if there is no symbol Daniel Jacobowitz
2006-02-21 10:26 ` Richard Earnshaw
2006-03-30 17:15 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox