Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Signal values
@ 2004-09-02 15:23 Fabian Cenedese
  2004-09-02 15:42 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Cenedese @ 2004-09-02 15:23 UTC (permalink / raw)
  To: gdb

Hi

Is there a uniform declaration of the signals? It seems that gdb is not using
the same as Linux.

Linux\include\asm-ppc\signal.h (included from ppc-stub.c from the kgdb
project which I used as base for my stub):

#define SIGHUP		 1
#define SIGINT			2
#define SIGQUIT		 3
#define SIGILL			4
#define SIGTRAP		 5
#define SIGABRT		 6
#define SIGIOT		 6
#define SIGBUS		 7
#define SIGFPE		 8
#define SIGKILL		 9
#define SIGUSR1		10
#define SIGSEGV		11
#define SIGUSR2		12
#define SIGPIPE		13
#define SIGALRM		14
#define SIGTERM		15

But when I send a 10 gdb tells me it's a SIGBUS which would go along this
list from binutils/include/gdb/signals.h:

enum target_signal
  {
    TARGET_SIGNAL_0 = 0,
    TARGET_SIGNAL_FIRST = 0,
    TARGET_SIGNAL_HUP = 1,
    TARGET_SIGNAL_INT = 2,
    TARGET_SIGNAL_QUIT = 3,
    TARGET_SIGNAL_ILL = 4,
    TARGET_SIGNAL_TRAP = 5,
    TARGET_SIGNAL_ABRT = 6,
    TARGET_SIGNAL_EMT = 7,
    TARGET_SIGNAL_FPE = 8,
    TARGET_SIGNAL_KILL = 9,
    TARGET_SIGNAL_BUS = 10,
    TARGET_SIGNAL_SEGV = 11,
    TARGET_SIGNAL_SYS = 12,
    TARGET_SIGNAL_PIPE = 13,
    TARGET_SIGNAL_ALRM = 14,
    TARGET_SIGNAL_TERM = 15,

Is this the definitve list? If so why are there other lists? I know that different
processors have different signals, but I already configured gdb for powerpc
so it should know which numbers are valid. Or does gdb assume to have
a Linux system? Should I just include signal.h from Linux?

And as aside question: which one is the signal that says the target has
reached a breakpoint?

Thanks

bye  Fabi



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

* Re: Signal values
  2004-09-02 15:23 Signal values Fabian Cenedese
@ 2004-09-02 15:42 ` Daniel Jacobowitz
  2004-09-03 14:04   ` Fabian Cenedese
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-09-02 15:42 UTC (permalink / raw)
  To: Fabian Cenedese; +Cc: gdb

On Thu, Sep 02, 2004 at 05:22:22PM +0200, Fabian Cenedese wrote:
> Hi
> 
> Is there a uniform declaration of the signals? It seems that gdb is not using
> the same as Linux.
> 
> Linux\include\asm-ppc\signal.h (included from ppc-stub.c from the kgdb
> project which I used as base for my stub):

Recent versions of the kgdb stub should translate the signal numbers
correctly, I remember helping them fix this.

> 
> #define SIGHUP		 1
> #define SIGINT			2
> #define SIGQUIT		 3
> #define SIGILL			4
> #define SIGTRAP		 5
> #define SIGABRT		 6
> #define SIGIOT		 6
> #define SIGBUS		 7
> #define SIGFPE		 8
> #define SIGKILL		 9
> #define SIGUSR1		10
> #define SIGSEGV		11
> #define SIGUSR2		12
> #define SIGPIPE		13
> #define SIGALRM		14
> #define SIGTERM		15

These are Linux/PowerPC signal numbers.

> But when I send a 10 gdb tells me it's a SIGBUS which would go along this
> list from binutils/include/gdb/signals.h:
> 
> enum target_signal
>   {
>     TARGET_SIGNAL_0 = 0,

These are remote protocol signal numbers.  They are target independent.

> And as aside question: which one is the signal that says the target has
> reached a breakpoint?

SIGTRAP.

-- 
Daniel Jacobowitz


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

* Re: Signal values
  2004-09-02 15:42 ` Daniel Jacobowitz
@ 2004-09-03 14:04   ` Fabian Cenedese
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Cenedese @ 2004-09-03 14:04 UTC (permalink / raw)
  To: gdb


>> But when I send a 10 gdb tells me it's a SIGBUS which would go along this
>> list from binutils/include/gdb/signals.h:
>> 
>> enum target_signal
>>   {
>>     TARGET_SIGNAL_0 = 0,
>
>These are remote protocol signal numbers.  They are target independent.

So then I will go for this.

>> And as aside question: which one is the signal that says the target has
>> reached a breakpoint?
>
>SIGTRAP.

I already thought so. But it seems I'm still doing something wrong. I have
a stopped thread which I want to single step. After sending the s gdb waits,
I guess until it receives a stop packet. But when I return SIGTRAP gdb
immediately continues the thread... I need to investigate some more.

Thanks

bye  Fabi



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

end of thread, other threads:[~2004-09-03 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 15:23 Signal values Fabian Cenedese
2004-09-02 15:42 ` Daniel Jacobowitz
2004-09-03 14:04   ` Fabian Cenedese

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