Re: How to tell gdb about dlls using remote protocol

Joel Brobecker
2007-02-05T21:21:24Z

Wiljan,

> The patch of Joel is based on a procedure that checks if code is in a
> known dll.

I think you are slightly confused. The little patch that I suggested
(and labeled untested) is not based on any previous patch. Have you
tried it without making the modifications you suggest below?

> For that reason, I modified the code so that I check if the pc is
> inside one of the sections of the program.

My other patch that you are refering to is the one that forces GDB
to trust %ebp in frameless functions that live in DLLs. This change
was to work-around a problem that is totally unrelated from the one
you are trying to solve.

To re-explain the logic behind the suggestion I posted here, when
we don't find the function start address (as in your case), we don't
parse the prologue. In this case, the current code will fallback on
using the default value for cache->sp_offset, which is unlikely to
be right. My suggestion instead is to trust the %ebp register, for
which we have found that we get better results (on Windows).

--
Joel