From: "Theodore A. Roth" <roth@amplepower.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] fix PR gdb/703 for avr-tdep.c
Date: Tue, 17 Sep 2002 16:14:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0209171608530.10502-200000@knuth.amplepower.com> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 301 bytes --]
Hi,
This patch fixes PR gdb/703 (bad argument to _read_register_dummy. While
testing, I also found that the "call foo()" wasn't pushing the return addr
onto the target stack, so I fixed that too.
Committed to main trunk.
Should this be pulled into the 5.3 branch?
How do I close the PR?
Ted Roth
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2078 bytes --]
2002-09-17 Theodore A. Roth <troth@verinet.com>
* gdb/avr-tdep.c(avr_scan_prologue): Fix bad call to
generic_read_register_dummy() (PR gdb/703).
(avr_push_return_address): #if 0 out unused vars.
(avr_gdbarch_init): Enable use of avr_push_return_address().
Index: gdb/avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.9
diff -u -r1.9 avr-tdep.c
--- gdb/avr-tdep.c 17 Sep 2002 20:42:01 -0000 1.9
+++ gdb/avr-tdep.c 17 Sep 2002 23:00:45 -0000
@@ -524,7 +524,6 @@
{
fi->frame = locals;
- /* TRoth: Does -1 mean we're in main? */
fi->extra_info->is_main = 1;
return;
}
@@ -755,11 +754,8 @@
{
/* We need to setup fi->frame here because run_stack_dummy gets it wrong
by assuming it's always FP. */
- /* FIXME: cagney/2002-09-13: This is wrong. The third parameter
- to deprecated_read_register_dummy() is REGNUM and not a frame
- address. */
fi->frame = deprecated_read_register_dummy (fi->pc, fi->frame,
- fi->frame);
+ AVR_PC_REGNUM);
}
else if (!fi->next) /* this is the innermost frame? */
fi->frame = read_register (fi->extra_info->framereg);
@@ -961,10 +957,10 @@
{
unsigned char buf[2];
int wordsize = 2;
+#if 0
struct minimal_symbol *msymbol;
CORE_ADDR mon_brk;
-
- fprintf_unfiltered (gdb_stderr, "avr_push_return_address() was called\n");
+#endif
buf[0] = 0;
buf[1] = 0;
@@ -1243,7 +1239,7 @@
set_gdbarch_deprecated_extract_return_value (gdbarch, avr_extract_return_value);
set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
-/* set_gdbarch_push_return_address (gdbarch, avr_push_return_address); */
+ set_gdbarch_push_return_address (gdbarch, avr_push_return_address);
set_gdbarch_pop_frame (gdbarch, avr_pop_frame);
set_gdbarch_deprecated_store_return_value (gdbarch, avr_store_return_value);
next reply other threads:[~2002-09-17 23:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-17 16:14 Theodore A. Roth [this message]
2002-09-17 16:39 ` Andrew Cagney
2002-09-17 23:18 ` Theodore A. Roth
2002-09-18 7:34 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0209171608530.10502-200000@knuth.amplepower.com \
--to=roth@amplepower.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox