This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 2343 fix: signal number mismatch


On Thu, Dec 13, 2007 at 11:11:58AM -0500, Aleksandar Ristovski wrote:
> Hello,
> 
> This patch fixes PR 2343: when host and target system OS differ, there can
> be mismatch between signal numeric values. This patch introduces new gdbarch
> function to allow different targets define their own mapping to enum
> target_signal.
> 
> ChangeLog:
> 
> 2007-12-13  Aleksandar Ristovski <aristovski@qnx.com>
> 
> 	* gdbarch.h: (gdbarch_target_signal_from_target_p): New function.
> 	(gdbarch_target_signal_from_target_ftype): New typedef.
> 	(gdbarch_target_signal_from_target): New function.
> 	(set_gdbarch_target_signal_from_target): New function.
> 	* gdbarch.c: (struct gdbarch): New field -
> target_signal_from_target.
> 	(struct gdbarch startup_gdbarch): Initialization for the new field.
> 	(verify_gdbarch): Added comment, 'Skip verify...'.
> 	(gdbarch_dump): Printing debug info for the new field.
> 	(gdbarch_target_signal_from_target_p): New function definition.
> 	(gdbarch_target_signal_from_target_ftype): New typedef definition.
> 	(gdbarch_target_signal_from_target): New function definition.
> 	(set_gdbarch_target_signal_from_target): New function definition.
> 	* corelow.c: (core_open): Added logic for calling new function if
> specified.

gdbarch.h and gdbarch.c are generated files (see the big comment at
the top of them).  You need to add the new function to the list in
gdbarch.sh instead.

The old comment:

     /* NOTE: target_signal_from_host() converts a target signal value
        into gdb's internal signal value.  Unfortunately gdb's internal
        value is called ``target_signal'' and this function got the
        name ..._from_host(). */

should go above the call to target_signal_from_host in one branch of
the if statement, I think.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]