Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Backport AVR fixes
@ 2014-04-10 16:30 Pierre Langlois
  2014-04-10 17:38 ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Langlois @ 2014-04-10 16:30 UTC (permalink / raw)
  To: gdb-patches

Hi all,

Would it be OK to backport these two commits to gdb-7.7-branch for the next
7.7.1 release?

https://sourceware.org/ml/gdb-patches/2014-04/msg00097.html
https://sourceware.org/ml/gdb-patches/2014-03/msg00425.html

I am not yet familiar with the process of backporting patches in GDB, let me
know if I am doing this correctly. For instance, should I break this into
several commits?

Best,

Pierre

2014-04-08  Pierre Langlois  <pierre.langlois@embecosm.com>

	* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
	(avr_gdbarch_init): Add xmega architectures given by bfd_architecture
	when setting the size of call_length.
	(avr_scan_prologue): Accept push r1 instruction for small stack
	allocation.
	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".
---
 gdb/MAINTAINERS |  1 +
 gdb/avr-tdep.c  | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index ffd310b..c0297c1 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -546,6 +546,7 @@ Jim Kingdon					kingdon@panix.com
 Paul Koning					paul_koning@dell.com
 Jan Kratochvil					jan.kratochvil@redhat.com
 Maxim Kuvyrkov					maxim@kugelworks.com
+Pierre Langlois 				pierre.langlois@embecosm.com
 Jonathan Larmour				jifl@ecoscentric.com
 Jeff Law					law@redhat.com
 Justin Lebar					justin.lebar@gmail.com
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index cb330ea..1be9e7d 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -179,7 +179,7 @@ struct avr_unwind_cache
 struct gdbarch_tdep
 {
   /* Number of bytes stored to the stack by call instructions.
-     2 bytes for avr1-5, 3 bytes for avr6.  */
+     2 bytes for avr1-5 and avrxmega1-5, 3 bytes for avr6 and avrxmega6-7.  */
   int call_length;
 
   /* Type for void.  */
@@ -719,7 +719,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
           info->size += gdbarch_tdep (gdbarch)->call_length;
           vpc += 2;
         }
-      else if (insn == 0x920f)  /* push r0 */
+      else if (insn == 0x920f || insn == 0x921f)  /* push r0 or push r1 */
         {
           info->size += 1;
           vpc += 2;
@@ -1355,14 +1355,21 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   switch (info.bfd_arch_info->mach)
     {
     case bfd_mach_avr1:
+    case bfd_mach_avrxmega1:
     case bfd_mach_avr2:
+    case bfd_mach_avrxmega2:
     case bfd_mach_avr3:
+    case bfd_mach_avrxmega3:
     case bfd_mach_avr4:
+    case bfd_mach_avrxmega4:
     case bfd_mach_avr5:
+    case bfd_mach_avrxmega5:
     default:
       call_length = 2;
       break;
     case bfd_mach_avr6:
+    case bfd_mach_avrxmega6:
+    case bfd_mach_avrxmega7:
       call_length = 3;
       break;
     }
-- 
1.8.3.1


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

* Re: [PATCH] Backport AVR fixes
  2014-04-10 16:30 [PATCH] Backport AVR fixes Pierre Langlois
@ 2014-04-10 17:38 ` Joel Brobecker
  2014-04-10 17:41   ` Joel Brobecker
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2014-04-10 17:38 UTC (permalink / raw)
  To: Pierre Langlois; +Cc: gdb-patches

> Would it be OK to backport these two commits to gdb-7.7-branch for the next
> 7.7.1 release?
> 
> https://sourceware.org/ml/gdb-patches/2014-04/msg00097.html
> https://sourceware.org/ml/gdb-patches/2014-03/msg00425.html
> 
> I am not yet familiar with the process of backporting patches in GDB, let me
> know if I am doing this correctly. For instance, should I break this into
> several commits?
> 
> Best,
> 
> Pierre
> 
> 2014-04-08  Pierre Langlois  <pierre.langlois@embecosm.com>
> 
> 	* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
> 	(avr_gdbarch_init): Add xmega architectures given by bfd_architecture
> 	when setting the size of call_length.
> 	(avr_scan_prologue): Accept push r1 instruction for small stack
> 	allocation.
> 	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".

Sure, go ahead. Please remember to confirm with a quick email on this
list when the push is done. This helps archeologist reviewing the emails
sent on this list.

Thanks,
-- 
Joel


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

* Re: [PATCH] Backport AVR fixes
  2014-04-10 17:38 ` Joel Brobecker
@ 2014-04-10 17:41   ` Joel Brobecker
  2014-04-11  9:29     ` Pierre Langlois
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2014-04-10 17:41 UTC (permalink / raw)
  To: Pierre Langlois; +Cc: gdb-patches

> > Would it be OK to backport these two commits to gdb-7.7-branch for the next
> > 7.7.1 release?
> > 
> > https://sourceware.org/ml/gdb-patches/2014-04/msg00097.html
> > https://sourceware.org/ml/gdb-patches/2014-03/msg00425.html
> > 
> > I am not yet familiar with the process of backporting patches in GDB, let me
> > know if I am doing this correctly. For instance, should I break this into
> > several commits?
> > 
> > Best,
> > 
> > Pierre
> > 
> > 2014-04-08  Pierre Langlois  <pierre.langlois@embecosm.com>
> > 
> > 	* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
> > 	(avr_gdbarch_init): Add xmega architectures given by bfd_architecture
> > 	when setting the size of call_length.
> > 	(avr_scan_prologue): Accept push r1 instruction for small stack
> > 	allocation.
> > 	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".
> 
> Sure, go ahead. Please remember to confirm with a quick email on this
> list when the push is done. This helps archeologist reviewing the emails
> sent on this list.

I FORGOT!  Please also update "Fixes in GDB 7.7.1" section of the gdb-7.7.x
release wiki page:
https://sourceware.org/gdb/wiki/GDB_7.7_Release

You will probably need to create a PR number to add the entry.

Thank you,
-- 
Joel


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

* Re: [PATCH] Backport AVR fixes
  2014-04-10 17:41   ` Joel Brobecker
@ 2014-04-11  9:29     ` Pierre Langlois
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Langlois @ 2014-04-11  9:29 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On 10/04/14 18:41, Joel Brobecker wrote:
>>> Would it be OK to backport these two commits to gdb-7.7-branch for the next
>>> 7.7.1 release?
>>>
>>> https://sourceware.org/ml/gdb-patches/2014-04/msg00097.html
>>> https://sourceware.org/ml/gdb-patches/2014-03/msg00425.html
>>>
>>> I am not yet familiar with the process of backporting patches in GDB, let me
>>> know if I am doing this correctly. For instance, should I break this into
>>> several commits?
>>>
>>> Best,
>>>
>>> Pierre
>>>
>>> 2014-04-08  Pierre Langlois  <pierre.langlois@embecosm.com>
>>>
>>> 	* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
>>> 	(avr_gdbarch_init): Add xmega architectures given by bfd_architecture
>>> 	when setting the size of call_length.
>>> 	(avr_scan_prologue): Accept push r1 instruction for small stack
>>> 	allocation.
>>> 	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".
>>
>> Sure, go ahead. Please remember to confirm with a quick email on this
>> list when the push is done. This helps archeologist reviewing the emails
>> sent on this list.
> 
> I FORGOT!  Please also update "Fixes in GDB 7.7.1" section of the gdb-7.7.x
> release wiki page:
> https://sourceware.org/gdb/wiki/GDB_7.7_Release
> 
> You will probably need to create a PR number to add the entry.
> 
> Thank you,
> 

Thank you Joel for your guidance, I am pushing now.

Best,

Pierre


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

end of thread, other threads:[~2014-04-11  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-10 16:30 [PATCH] Backport AVR fixes Pierre Langlois
2014-04-10 17:38 ` Joel Brobecker
2014-04-10 17:41   ` Joel Brobecker
2014-04-11  9:29     ` Pierre Langlois

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