This is the mail archive of the gdb-prs@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]

[Bug python/11792] Provide access to the dynamic type of an object


------- Additional Comments From andre dot poenitz at nokia dot com  2010-07-07 10:26 -------
Created an attachment (id=4872)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4872&action=view)
proof-of-concept code, mainly copied code from a path triggered by 'set print
object on'

With the attached patch and adding 

  -ex 'python print "Python says: '%s'" % gdb.parse_and_eval("b").dynamic_type'


to the test script I get

Temporary breakpoint 1, main () at <stdin>:5
5	<stdin>: No such file or directory.
	in <stdin>
6	in <stdin>
$1 = (Base *) 0x804b008
$2 = (Derived *) 0x804b008
Python says: Base *
Python says: Derived *


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11792

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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