bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signals on Mingw


From: Reuben Thomas
Subject: Re: Signals on Mingw
Date: Mon, 23 Nov 2020 17:08:03 +0000

On Mon, 23 Nov 2020 at 16:47, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Reuben Thomas <rrt@sc3d.org>
> Date: Mon, 23 Nov 2020 16:38:22 +0000
> Cc: Bruno Haible <bruno@clisp.org>, bug-gnulib <bug-gnulib@gnu.org>
>
>  Can you elaborate what are you using this module for in the MinGW
>  build?  AFAIK, Posix signals can never work well enough on Windows to
>  care about them.  Maybe I'm missing something.
>
> Signal numbers for use in a GDB debugger stub: stubs report errors/breaks etc to GDB as signal numbers.

So all you need is signal numbers?

That's right.

But why is it useful to report signals when none were actually
delivered to the program?

Because that's how GDB works: it uses signal numbers to represent CPU traps such as page faults and breakpoints.
 
  And how do you make sure the numbers you
report will be identical to what GDB itself uses?

Good question! Looks like the code is relying on the definitions matching. (I used one of the sample debugger stubs, which seems not to have been changed for many years; meanwhile, gdb seems to have introduced its own enumeration. I guess I'll look into this again at some point.) It doesn't seem to matter much anyway, as GDB's remote stub communicator only seems to ever use two concrete values. I guess the rest are just indicative. TBH it's several months since I worked on the code and it was my first time hacking inside GDB!

--
https://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]