RFA: probable rs6000-aix-tdep.c bug found by clang

Joel Brobecker brobecker@adacore.com
Thu Oct 18 18:49:00 GMT 2012

> OK - I will take care of removing the condition and simplifying
> the function.

Here is what I propose we check in.  I can't test it at the moment,
because we've suffered a massive power outage and we're still working
on getting every machine back up. I'm fairly confident, though.

Rather than remove the check, I added an assertion. That's because
eventually I want to add an extra check, for Lynx178. On the GDB side,
the Lynx178 port is roughly a bareboard powerpc configuration. But
it is using XCOFF, and I wanted to make sure that we'd never match
a Lynx178 binary with the AIX ABI. To do that, I use a BFD/XCOFF
function, so I thought adding the explict assertion would help.

While at it, I added a function description, that explicitly mentions
the pre-condition/assertion.

If there are no objections, I will commit the attached patch within
the next few days, after being able to test on AIX again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ppc-aix-osabi-sniffer-Turn-test-of-bfd-flavour-into-.patch
Type: text/x-diff
Size: 1756 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121018/48cf975b/attachment.bin>

More information about the Gdb-patches mailing list