Fwd: Java stack unwinder for Linux + gdb7.10+
adinn at redhat.com
Tue May 31 15:24:53 UTC 2016
On 31/05/16 15:55, Mikael Gerdin wrote:
> On 2016-05-31 16:46, Andrew Dinn wrote:
>> Hmm, this one's python fu is strong ... well, stronger than mine
>> (doesn't take too much :-)
> I doubt that :)
Ha, bluffed again!
>> Thanks for trying it and reporting back. I'm not really sure why that
>> change works for you and the original does not. Could you provide info
>> as to what error occurred before the change? and/or explain why the
>> change is needed?
> I tried it on the default gdb/python combo shipping on Ubuntu 15.10.
> My approach to solving it was to google "python try except", noticing
> that the official Python 3.5 docs contain code like "except Exception as
> foo" and applying the fix.
> I have no idea why or how it's supposed to work.
Ok. The syntax I used was an attempt to catch a value string provided as
argument to the caught exception (see
http://www.tutorialspoint.com/python/python_exceptions.htm if you want
to know how it is supposed to work). I suppose it fails because on
Ubuntu you can see exceptions created without a value arg.
I think that usage was only needed when I was seeing some weird
exceptions gdb was throwing up in an early version of the unwinder which
would not auto-convert to a string at print time. Those have been
avoided by making the unwinder resilient to recursive entry (something
gdb ought to guarantee but doesn't yet). So, I'm happy to adopt your
patch -- it seems to work fine on Fedora too. I'll push the patch into
my repo asap.
>> Yes, sorry for that. n.b. if you wind my hg repo back a bit a few
>> commits you get a jdk9 version of dbg.py that works with b118 and
>> predecessors (if you fixed it /without/ doing that I'm even more
>> impressed :).
> I just did a vimdiff of dbg.py and dbg8.py and replaced all the
> references to CompiledMethod and CodeBlob related stuff with the ones
> from the dbg8.py where it seemed appropriate.
Ok, so now I choose to be impressed by your pragmatic empiricism :-)
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the hotspot-dev