Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patch: Add arch_string to spu-low.c
@ 2007-02-22 14:33 Markus Deuling
  2007-02-22 14:56 ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Deuling @ 2007-02-22 14:33 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand

Hi,

this patch adds arch_string to spu-low.c

ChangeLog:

     * spu-low.c (spu_target_ops): Set arch_string.


Ok to commit ?


Regards,
Markus

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com 



========================================================

diff -urN src/gdb/gdbserver/spu-low.c dev/gdb/gdbserver/spu-low.c
--- src/gdb/gdbserver/spu-low.c 2007-01-09 18:59:08.000000000 +0100
+++ dev/gdb/gdbserver/spu-low.c 2007-02-22 14:30:26.000000000 +0100
@@ -572,6 +572,13 @@
spu_look_up_symbols,
spu_send_signal,
NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  "spu:256K",
};

void





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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 14:33 Patch: Add arch_string to spu-low.c Markus Deuling
@ 2007-02-22 14:56 ` Daniel Jacobowitz
  2007-02-22 15:21   ` Ulrich Weigand
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-22 14:56 UTC (permalink / raw)
  To: Markus Deuling; +Cc: GDB Patches, Ulrich Weigand

On Thu, Feb 22, 2007 at 03:33:12PM +0100, Markus Deuling wrote:
> Hi,
> 
> this patch adds arch_string to spu-low.c
> 
> ChangeLog:
> 
>     * spu-low.c (spu_target_ops): Set arch_string.
> 
> 
> Ok to commit ?

OK if it's OK with Ulrich (do you always want "SPU:256K"?  Just "spu"
should work too).


-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 14:56 ` Daniel Jacobowitz
@ 2007-02-22 15:21   ` Ulrich Weigand
  2007-02-22 15:30     ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Weigand @ 2007-02-22 15:21 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Markus Deuling, GDB Patches

Daniel Jakowobitz wrote:

> OK if it's OK with Ulrich (do you always want "SPU:256K"?  Just "spu"
> should work too).

Can you elaborate on what effect that change would have?  Does it
then try to automatically select the subarchitecture?  (We just
have the one right now anyway ...)

Markus,

can you prepare and test a patch with just "spu" here?


Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 15:21   ` Ulrich Weigand
@ 2007-02-22 15:30     ` Daniel Jacobowitz
  2007-02-22 15:34       ` Ulrich Weigand
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-22 15:30 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Markus Deuling, GDB Patches

On Thu, Feb 22, 2007 at 04:21:28PM +0100, Ulrich Weigand wrote:
> Daniel Jakowobitz wrote:
> 
> > OK if it's OK with Ulrich (do you always want "SPU:256K"?  Just "spu"
> > should work too).
> 
> Can you elaborate on what effect that change would have?  Does it
> then try to automatically select the subarchitecture?  (We just
> have the one right now anyway ...)

It will select the default subarchitecture - what may be more
interesting is that it won't complain if the user or binary file has
selected a different subarchitecture.  This is a bit tricky; see
choose_architecture_for_target in arch-utils.c, particularly the
the_default check.

So suppose you have in the future an spu:512K, and gdbserver doesn't
need to know the difference, but it's recorded in the ELF file.  GDB
would object if gdbserver reported "I have an spu:256K".

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 15:30     ` Daniel Jacobowitz
@ 2007-02-22 15:34       ` Ulrich Weigand
  2007-02-22 16:36         ` Markus Deuling
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Weigand @ 2007-02-22 15:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Markus Deuling, GDB Patches

Daniel Jakowowitz wrote:
> On Thu, Feb 22, 2007 at 04:21:28PM +0100, Ulrich Weigand wrote:
> > Daniel Jakowobitz wrote:
> > 
> > > OK if it's OK with Ulrich (do you always want "SPU:256K"?  Just "spu"
> > > should work too).
> > 
> > Can you elaborate on what effect that change would have?  Does it
> > then try to automatically select the subarchitecture?  (We just
> > have the one right now anyway ...)
> 
> It will select the default subarchitecture - what may be more
> interesting is that it won't complain if the user or binary file has
> selected a different subarchitecture.  This is a bit tricky; see
> choose_architecture_for_target in arch-utils.c, particularly the
> the_default check.
> 
> So suppose you have in the future an spu:512K, and gdbserver doesn't
> need to know the difference, but it's recorded in the ELF file.  GDB
> would object if gdbserver reported "I have an spu:256K".

Ah, thanks for the explanation.  I agree that "spu" would be the
better choice then.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 15:34       ` Ulrich Weigand
@ 2007-02-22 16:36         ` Markus Deuling
  2007-02-22 16:45           ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Deuling @ 2007-02-22 16:36 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Daniel Jacobowitz, GDB Patches

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

Hi,


> Ah, thanks for the explanation.  I agree that "spu" would be the
> better choice then.

"spu" works. I attached a new correct patch. If ok, then please take this one for commit.


ChangeLog:

        * spu-low.c (spu_arch_string): New.
        (spu_target_ops): Add spu_arch_string.



Regards,
Markus

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com 

[-- Attachment #2: diff-spu-arch-string --]
[-- Type: text/plain, Size: 584 bytes --]

diff -urN src.orig/gdb/gdbserver/spu-low.c src/gdb/gdbserver/spu-low.c
--- src.orig/gdb/gdbserver/spu-low.c	2007-01-09 18:59:08.000000000 +0100
+++ src/gdb/gdbserver/spu-low.c	2007-02-22 16:49:11.000000000 +0100
@@ -556,6 +556,12 @@
   syscall (SYS_tkill, current_tid, signo);
 }
 
+static const char *
+spu_arch_string (void)
+{
+  return "spu";
+}
+
 \f
 static struct target_ops spu_target_ops = {
   spu_create_inferior,
@@ -572,6 +578,13 @@
   spu_look_up_symbols,
   spu_send_signal,
   NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  spu_arch_string,
 };
 
 void

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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 16:36         ` Markus Deuling
@ 2007-02-22 16:45           ` Daniel Jacobowitz
  2007-02-22 17:42             ` Ulrich Weigand
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-02-22 16:45 UTC (permalink / raw)
  To: Markus Deuling; +Cc: Ulrich Weigand, GDB Patches

On Thu, Feb 22, 2007 at 05:35:33PM +0100, Markus Deuling wrote:
>        * spu-low.c (spu_arch_string): New.
>        (spu_target_ops): Add spu_arch_string.

Thanks, this is OK.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: Patch: Add arch_string to spu-low.c
  2007-02-22 16:45           ` Daniel Jacobowitz
@ 2007-02-22 17:42             ` Ulrich Weigand
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Weigand @ 2007-02-22 17:42 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Markus Deuling, GDB Patches

Daniel Jacobowitz wrote:
> On Thu, Feb 22, 2007 at 05:35:33PM +0100, Markus Deuling wrote:
> >        * spu-low.c (spu_arch_string): New.
> >        (spu_target_ops): Add spu_arch_string.
> 
> Thanks, this is OK.

I've committed this one as well, thanks.

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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

* Patch: Add arch_string to spu-low.c
@ 2007-02-22 14:57 Markus Deuling
  0 siblings, 0 replies; 9+ messages in thread
From: Markus Deuling @ 2007-02-22 14:57 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand

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

Hi,

this patch adds arch_string to spu-low.c

ChangeLog:

    * spu-low.c (spu_target_ops): Set arch_string.


Ok to commit ? 

Regards,
Markus

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com 



[-- Attachment #2: diff-spu-arch-string --]
[-- Type: text/plain, Size: 359 bytes --]

diff -urN src/gdb/gdbserver/spu-low.c dev/gdb/gdbserver/spu-low.c
--- src/gdb/gdbserver/spu-low.c	2007-01-09 18:59:08.000000000 +0100
+++ dev/gdb/gdbserver/spu-low.c	2007-02-22 14:30:26.000000000 +0100
@@ -572,6 +572,13 @@
   spu_look_up_symbols,
   spu_send_signal,
   NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  NULL,
+  "spu:256K",
 };
 
 void



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

end of thread, other threads:[~2007-02-22 17:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 14:33 Patch: Add arch_string to spu-low.c Markus Deuling
2007-02-22 14:56 ` Daniel Jacobowitz
2007-02-22 15:21   ` Ulrich Weigand
2007-02-22 15:30     ` Daniel Jacobowitz
2007-02-22 15:34       ` Ulrich Weigand
2007-02-22 16:36         ` Markus Deuling
2007-02-22 16:45           ` Daniel Jacobowitz
2007-02-22 17:42             ` Ulrich Weigand
2007-02-22 14:57 Markus Deuling

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