Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Pierre-Marie de Rodat
On 07/27/2017 10:36 AM, Richard Biener wrote: Given that gdb can decode dwarf and we rely on gdb for guality and gdb has python scripting can we somehow walk its dwarf tree from within a python script? That is, not need the dwarf decoding or objdump requirement? I’m quite familiar with GDB’s P

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Pierre-Marie de Rodat
On 07/26/2017 07:09 PM, David Malcolm wrote: +If `single_cu` is True, make sure there is exactly one compilation unit and "is True" -> "is true" Fixed. +:param bool or_error: When True, if `single` is True and no attribute "True" -> "true" in two places Fixed. +:pa

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-27 Thread Richard Biener
On Wed, Jul 26, 2017 at 6:00 PM, Pierre-Marie de Rodat wrote: > For now, this supports only platforms that have an objdump available for > the corresponding target. There are several things that would be nico to > have in the future: > > * add support for more DWARF dumping tools, such as otool

Re: [PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-26 Thread David Malcolm
On Wed, 2017-07-26 at 18:00 +0200, Pierre-Marie de Rodat wrote: [...] > diff --git a/gcc/testsuite/python/dwarfutils/__init__.py > b/gcc/testsuite/python/dwarfutils/__init__.py > new file mode 100644 > index 000..246fbbd15be > --- /dev/null > +++ b/gcc/testsuite/python/dwarfutils/__init__.p

[PATCH 2/2] Introduce Python testcases to check DWARF output

2017-07-26 Thread Pierre-Marie de Rodat
For now, this supports only platforms that have an objdump available for the corresponding target. There are several things that would be nico to have in the future: * add support for more DWARF dumping tools, such as otool on Darwin; * have a DWARF location expression decoder, to be able to