Re: [PATCH v3 21/29] Share handle_exception

Simon Marchi
2020-04-15T17:54:21Z

On 2020-04-15 12:54 p.m., Tom Tromey wrote:
> Simon> This patch introduced some GDB-specific calls in nat/windows-nat.c. That
> Simon> file is built by gdbserver, so it breaks that build. This is when building
> Simon> on Cygwin:
>
> For reasons I don't really understand, I can't seem to do a Cygwin
> build. (And, I have little control over the Windows machines I do have
> access to, so I can't really fix the problem, whatever it is.)
>
> So, could you try this patch?
>
> Tom

It helps, but there's still:

CXX nat/windows-nat.o
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c: In function ‘windows_nat::handle_exception_result windows_nat::handle_exception(target_waitstatus*, bool)’:
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c:214:10: error: ‘find_pc_partial_function’ was not declared in this scope
214 | || (find_pc_partial_function (addr, &fn, NULL, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~

But even if that did build, I don't think it's right. That code will be used by gdbserver, which
will never initialize cygwin_load_start and cygwin_load_end.

If we look at gdbserver's version of the function before this change, it didn't have that part,
so perhaps it should be factored out into a callback, which will reside in gdb/windows-nat.c.

Simon