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: [windows] patch to set breakpoint in a dll


On 2012-3-8 2:46, Doug Evans wrote:
The patch has a few nits that need to be fixed, but I like the idea:
Hi, Doug, Thanks for the reply.
have find_and_open_source consistently return the canonicalized path.
However, openp (called by find_and_open_source later on) uses
xfullpath, so for consistency I think that should be used here too
instead of gdb_realpath.
What do others think?
By reading the function body of xfullpath, I see that it do more checks.
And transfer from gdb_realpath to xfullpath will adding an extra xmalloc and xfree call.

BTW: are there any simple way we can quickly check a path is cononicalized or not, because even gdb_realpath have internally call xmalloc and xfree. but once the *fullname is already cononicalized(after the first call of find_and_open_source()), I think we can avoid calling any xmalloc and xfree. Am I right?

Yuanhui Zhang


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