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]

[PATCH 0/3] some target delegation cleanups


This series fixes a few issues either introduced by or exposed by the
target delegation change.  This came out of PR gdb/17130.

There hasn't been a reason to check if ops->beneath is NULL for some
time (I don't know when, I think it predates my involvement with gdb).
This series removes these checks.

This series removes some cases where code iterates over "beneath"
targets looking for a method implemenation.  For delegated methods
this is never necessary and these loops, while not strictly incorrect,
serve only to confuse as they always exit on the first iteration.

This fixes a few calls to find_target_beneath of the form
find_target_beneath(&something).  It's more robust to use the
target_ops being passed in to a method.

Finally, this series has a partial fix for the PR, in that it changes
the code in utils.c to at least try to be correct.  However now that
windows-nat.c inherits from the native target, the bug itself still
remains.

Built and regtested on x86-64 Fedora 20.  Pedro tried out the fix in
patch #2 on Windows, which is how we found out that it was
insufficient :).

There are parts of this patch that I couldn't readily compile or test.
Please take a look if they affect something you care about.  I believe
for the most part they are obvious changes, and in any case any error
here is readily recovered from.

Tom


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