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 Wed, Mar 7, 2012 at 6:18 PM, asmwarrior <asmwarrior@gmail.com> wrote:
> 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?

No such quick check is available, but I think we can ignore the cost
of the xmalloc/xfree for this particular case until the data shows
it's a problem.


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