mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
change delegation for to_read_description
This switches to_read_description to the "new normal" delegation scheme. This one was a bit trickier than the other changes due to the way that target_read_description handled delegation. I examined all the target implementations of to_read_description and changed the ones returning NULL to instead delegate. 2014-02-19 Tom Tromey <tromey@redhat.com> * arm-linux-nat.c (arm_linux_read_description): Delegate when needed. * corelow.c (core_read_description): Delegate when needed. * remote.c (remote_read_description): Delegate when needed. * target-delegates.c: Rebuild. * target.c (target_read_description): Rewrite. * target.h (struct target_ops) <to_read_description>: Update comment. Use TARGET_DEFAULT_RETURN.
This commit is contained in:
@@ -913,10 +913,16 @@ static const struct target_desc *
|
||||
core_read_description (struct target_ops *target)
|
||||
{
|
||||
if (core_gdbarch && gdbarch_core_read_description_p (core_gdbarch))
|
||||
return gdbarch_core_read_description (core_gdbarch,
|
||||
target, core_bfd);
|
||||
{
|
||||
const struct target_desc *result;
|
||||
|
||||
return NULL;
|
||||
result = gdbarch_core_read_description (core_gdbarch,
|
||||
target, core_bfd);
|
||||
if (result != NULL)
|
||||
return result;
|
||||
}
|
||||
|
||||
return target->beneath->to_read_description (target->beneath);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
||||
Reference in New Issue
Block a user