This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: signal names
- To: markom at opencores dot org
- Subject: Re: signal names
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 06 Jun 2001 06:37:14 -0400
- Cc: gdb at sources dot redhat dot com
- References: <3B08EBDC.7631736@opencores.org>
> Hello!
>
> Is there any convenient way to add custom signal names, used by
>
> /* Return the string for a signal. */
> extern char *target_signal_to_string PARAMS ((enum target_signal));
>
> /* Return the name (SIGHUP, etc.) for a signal. */
> extern char *target_signal_to_name PARAMS ((enum target_signal));
>
> /* Given a name (SIGHUP, etc.), return its signal. */
> enum target_signal target_signal_from_name PARAMS ((char *));
>
> We would need special hardware names, which will be used for
> catchpoints?
> I would really like to avoid adding ifdefs in target.c and target.h
Not really.
GDB has a very UNIX/signal centric view of the target's event model. It
assumes that everything to do with a target event can be represented as
a very small integer - with real hardware events that is almost never
the case.
People debugging embedded systems typically map hardware signals onto
roughly equivalent UNIX signals. From what I've seen this works pretty
well.
Andrew