This is the mail archive of the 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

Daniel Jacobowitz wrote:
> 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
> instead.

Hello Daniel,

I have made changes to The attached patch is not complete (and
the generated gdbarch.c would not produce linkable gdb) but I just wanted to
double-check if this is correct. After you confirm   I will add other
necessary changes.

The patch introduces two new functions for translating signal number between
GDB's internal representation and targeted system's signal number.

To give some background to those who are not familiar with the issue: in
multi-arch situations, or in remote debugging situations, target's signal
number and gdb's signal number may not match, e.g. signal number 14 on the
target may mean SIGINT, while it may mean something else on the GDB's host
system. In such cases, GDB will misinterpret the inferior's signal; this can
also easily happen when examining core files on a GDB host other than the
system that generated the core.

Please pay special attention to the naming, it is somewhat confusing: 'enum
target_signal' is GDB's universal representation of signals and is GDB's
host independent. New functions added to gdbarch structure are named as
where 'host' means 'inferior's host' (host where inferior is running).


Aleksandar Ristovski
QNX Software Systems

Description: Text document

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