public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix bug in nios2 prologue analysis.
@ 2019-08-23 15:20 Sandra Loosemore
0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2019-08-23 15:20 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de8af80891ff0eee61cd219b316e176e9ae88e91
commit de8af80891ff0eee61cd219b316e176e9ae88e91
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Fri Aug 23 08:18:54 2019 -0700
Fix bug in nios2 prologue analysis.
The nios2 prologue analyzer was mistakenly using an unsigned int field
to represent a 32-bit signed value. This caused problems with an
incorrect conversion being applied to negative values when they were
automatically promoted for addition to a 64-bit CORE_ADDR value.
This patch fixes test failures in gdb.base/large-frame.exp and
gdb.dwarf2/dw2-ref-missing-frame.exp. Normally the nios2 backend
prefers to use the dwarf2 unwinder so the prologue analyzer is only
invoked if there is no dwarf2 information.
2019-08-23 Sandra Loosemore <sandra@codesourcery.com>
gdb/
* nios2-tdep.c (struct reg_value): Improve comments. Make
the offset field signed.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/nios2-tdep.c | 8 +++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac84245..df8488b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-23 Sandra Loosemore <sandra@codesourcery.com>
+
+ * nios2-tdep.c (struct reg_value): Improve comments. Make
+ the offset field signed.
+
2019-08-22 Christian Biesinger <cbiesinger@google.com>
* python/lib/gdb/__init__.py (_execute_file): New function.
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index 2a21c33..8d685d4 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -58,13 +58,15 @@ static int nios2_debug = 0;
analysis; see the reg_value and reg_saved tables in
struct nios2_unwind_cache, respectively. */
-/* struct reg_value is used to record that a register has the same value
- as reg at the given offset from the start of a function. */
+/* struct reg_value is used to record that a register has reg's initial
+ value at the start of a function plus the given constant offset.
+ If reg == 0, then the value is just the offset.
+ If reg < 0, then the value is unknown. */
struct reg_value
{
int reg;
- unsigned int offset;
+ int offset;
};
/* struct reg_saved is used to record that a register value has been saved at
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-23 15:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 15:20 [binutils-gdb] Fix bug in nios2 prologue analysis Sandra Loosemore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).