Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] fix PR gdb/703 for avr-tdep.c
@ 2002-09-17 16:14 Theodore A. Roth
  2002-09-17 16:39 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore A. Roth @ 2002-09-17 16:14 UTC (permalink / raw)
  To: gdb-patches

[-- 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);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix PR gdb/703 for avr-tdep.c
  2002-09-17 16:14 [PATCH] fix PR gdb/703 for avr-tdep.c Theodore A. Roth
@ 2002-09-17 16:39 ` Andrew Cagney
  2002-09-17 23:18   ` Theodore A. Roth
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-09-17 16:39 UTC (permalink / raw)
  To: Theodore A. Roth; +Cc: gdb-patches

> 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?

I think yes (but its your target so your decision :-)

> How do I close the PR?

Click on ``login again'', enter your username/password.  The top line 
should change to ``Access: edit''.  You can then change the PR status to 
closed (and assign it to yourself).

Andrew



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix PR gdb/703 for avr-tdep.c
  2002-09-17 16:39 ` Andrew Cagney
@ 2002-09-17 23:18   ` Theodore A. Roth
  2002-09-18  7:34     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore A. Roth @ 2002-09-17 23:18 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Tue, 17 Sep 2002, Andrew Cagney wrote:

:)> Should this be pulled into the 5.3 branch?
:)
:)I think yes (but its your target so your decision :-)

I'll pull it in in the morning. One question though. I'm assuming you didn't
deprecate generic_read_register_dummy() in the 5.3 branch, right? (I haven't
checked out the branch yet, too painful over a modem)

:)
:)> How do I close the PR?
:)
:)Click on ``login again'', enter your username/password.  The top line 
:)should change to ``Access: edit''.  You can then change the PR status to 
:)closed (and assign it to yourself).

Done.

Ted Roth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix PR gdb/703 for avr-tdep.c
  2002-09-17 23:18   ` Theodore A. Roth
@ 2002-09-18  7:34     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-09-18  7:34 UTC (permalink / raw)
  To: Theodore A. Roth; +Cc: gdb-patches

> On Tue, 17 Sep 2002, Andrew Cagney wrote:
> 
> :)> Should this be pulled into the 5.3 branch?
> :)
> :)I think yes (but its your target so your decision :-)
> 
> I'll pull it in in the morning. One question though. I'm assuming you didn't
> deprecate generic_read_register_dummy() in the 5.3 branch, right? (I haven't
> checked out the branch yet, too painful over a modem)

Nope.  Perhaphs grab a 5.3 CVS snapshot.  It's bz2 so is faster over a 
modem.

Andrew




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-18 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17 16:14 [PATCH] fix PR gdb/703 for avr-tdep.c Theodore A. Roth
2002-09-17 16:39 ` Andrew Cagney
2002-09-17 23:18   ` Theodore A. Roth
2002-09-18  7:34     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox