Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add support for Analog Devices Blackfin processor (part 3/6:  gdb testsuite)
@ 2005-12-30 10:13 Jie Zhang
  2006-01-04  5:32 ` Jim Blandy
  0 siblings, 1 reply; 5+ messages in thread
From: Jie Zhang @ 2005-12-30 10:13 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

This is the third part for Analog Devices Blackfin processor, which adds
bfin support in asm-source.exp.

Any comments?

Thanks,
Jie


[-- Attachment #2: bfin-gdb-testsuite.diff --]
[-- Type: text/x-patch, Size: 1539 bytes --]

gdb/

	* testsuite/gdb.asm/asm-source.exp: Add support for bfin-*-*.
	* testsuite/gdb.asm/bfin.inc: New file.


diff -r -N -u -x CVS src.orig/gdb/testsuite/gdb.asm/asm-source.exp src/gdb/testsuite/gdb.asm/asm-source.exp
--- src.orig/gdb/testsuite/gdb.asm/asm-source.exp	2005-12-09 19:05:26.000000000 +0800
+++ src/gdb/testsuite/gdb.asm/asm-source.exp	2005-12-27 16:55:44.000000000 +0800
@@ -51,6 +51,11 @@
     "xscale-*-*" {
         set asm-arch arm
     }
+    "bfin-*-*" {
+        set asm-arch bfin
+        set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+        set debug-flags "-g"
+    }
     "d10v-*-*" {
         set asm-arch d10v
     }
diff -r -N -u -x CVS src.orig/gdb/testsuite/gdb.asm/bfin.inc src/gdb/testsuite/gdb.asm/bfin.inc
--- src.orig/gdb/testsuite/gdb.asm/bfin.inc	1970-01-01 08:00:00.000000000 +0800
+++ src/gdb/testsuite/gdb.asm/bfin.inc	2005-12-27 16:56:38.000000000 +0800
@@ -0,0 +1,44 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	LINK 12;
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	UNLINK;
+	RTS;
+	.endm
+
+	.macro gdbasm_call subr
+	call \subr;
+	.endm
+
+	.macro gdbasm_several_nops
+	mnop;
+	mnop;
+	mnop;
+	mnop;
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	R0 = 0;
+	RAISE 0;
+	.endm
+
+	comment "crt0 startup"
+	.macro gdbasm_startup
+	FP = 0;
+	.endm
+
+	comment "Declare a data variable"
+	.purgem gdbasm_datavar
+	.macro gdbasm_datavar name value
+	.data
+	.align 4
+	.type	\name, @object
+	.size	\name, 4
+\name:
+	.long \value
+	.endm
+


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

* Re: [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite)
  2005-12-30 10:13 [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite) Jie Zhang
@ 2006-01-04  5:32 ` Jim Blandy
  2006-01-04  6:41   ` Jie Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Blandy @ 2006-01-04  5:32 UTC (permalink / raw)
  To: Jie Zhang; +Cc: gdb-patches

On 12/27/05, Jie Zhang <jzhang918@gmail.com> wrote:
+        set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"

What's the story behind these -I flags that seem to be sprouting up in
a lot of the cases in asm-source.exp?  It seems like they should
either be necessary everywhere, or nowhere.


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

* Re: [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite)
  2006-01-04  5:32 ` Jim Blandy
@ 2006-01-04  6:41   ` Jie Zhang
  2006-01-04  8:22     ` Jim Blandy
  0 siblings, 1 reply; 5+ messages in thread
From: Jie Zhang @ 2006-01-04  6:41 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

Hi Jim,

Thanks a lot for reviewing these patches!

On 1/4/06, Jim Blandy <jimb@red-bean.com> wrote:
> On 12/27/05, Jie Zhang <jzhang918@gmail.com> wrote:
> +        set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
>
> What's the story behind these -I flags that seem to be sprouting up in
> a lot of the cases in asm-source.exp?  It seems like they should
> either be necessary everywhere, or nowhere.
>
This is the easiest question for me, so I answer it first.

In asm-source.exp, first comes:

set asm-flags ""

After all target things, there is:

if { "${asm-flags}" == "" } {
    set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
    set debug-flags "-gstabs"
}

So if target does not set asm-flags, the debug-flags will be set to
"-gstabs", which will override anything target set for it. If any
target want to use dwarf2 as debug information, like bfin and others,
it needs set asm-flags to the vanilla string to avoid the overriding.

Regards,
Jie


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

* Re: [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite)
  2006-01-04  6:41   ` Jie Zhang
@ 2006-01-04  8:22     ` Jim Blandy
  2006-01-20 23:22       ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Blandy @ 2006-01-04  8:22 UTC (permalink / raw)
  To: Jie Zhang; +Cc: gdb-patches

On 1/3/06, Jie Zhang <jzhang918@gmail.com> wrote:
> Hi Jim,
>
> Thanks a lot for reviewing these patches!

Thanks for writing them!

> So if target does not set asm-flags, the debug-flags will be set to
> "-gstabs", which will override anything target set for it. If any
> target want to use dwarf2 as debug information, like bfin and others,
> it needs set asm-flags to the vanilla string to avoid the overriding.

Hmm; I don't understand why the defaulting process works that way. 
I've posted a patch intended to make that code unnecessary:

http://sourceware.org/ml/gdb-patches/2006-01/msg00034.html

Let's see what people say.


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

* Re: [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite)
  2006-01-04  8:22     ` Jim Blandy
@ 2006-01-20 23:22       ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-01-20 23:22 UTC (permalink / raw)
  To: Jim Blandy; +Cc: Jie Zhang, gdb-patches

On Wed, Jan 04, 2006 at 12:22:13AM -0800, Jim Blandy wrote:
> On 1/3/06, Jie Zhang <jzhang918@gmail.com> wrote:
> > Hi Jim,
> >
> > Thanks a lot for reviewing these patches!
> 
> Thanks for writing them!
> 
> > So if target does not set asm-flags, the debug-flags will be set to
> > "-gstabs", which will override anything target set for it. If any
> > target want to use dwarf2 as debug information, like bfin and others,
> > it needs set asm-flags to the vanilla string to avoid the overriding.
> 
> Hmm; I don't understand why the defaulting process works that way. 
> I've posted a patch intended to make that code unnecessary:
> 
> http://sourceware.org/ml/gdb-patches/2006-01/msg00034.html
> 
> Let's see what people say.

They didn't say anything, IIRC, and Jim's patch was committed.  Jie,
you may want to regenerate the asm-source.exp change against HEAD.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-01-20 23:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-30 10:13 [PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite) Jie Zhang
2006-01-04  5:32 ` Jim Blandy
2006-01-04  6:41   ` Jie Zhang
2006-01-04  8:22     ` Jim Blandy
2006-01-20 23:22       ` Daniel Jacobowitz

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