Skip to content

Instantly share code, notes, and snippets.

@ykubota ykubota/sample.gdb
Created Jul 26, 2016

Embed
What would you like to do?
check address of counter and its member
set logging on
set logging file /path/to/file
f 7
p/x counter
p/x counter->objData
p/x (TObjectData *)counter->objData
p/x counter->objData->klassOop
@ykubota

This comment has been minimized.

Copy link
Owner Author

commented Jul 26, 2016

2 行目の /path/to/file を変更し、そのログを頂ければ幸いです。

やろうとしていること
本来オブジェクトデータを (counter->objData に) 保存している筈が、mapped されていないアドレスを見に行って SEGV が発生しているので、何のアドレスが突っ込まれているかを確認しようとしています。

参考
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3104

@wyukawa

This comment has been minimized.

Copy link

commented Jul 26, 2016

(gdb) set logging file /tmp/gdb.log
(gdb) set logging on
Copying output to /tmp/gdb.log.
(gdb) f 7
#7 0x00007fdfebd0d3bd in findChildClass (this=0x7fdfee9e8d80) at snapShotContainer.hpp:277

277 while (counter->objData->klassOop != klassOop) {
(gdb) p/x counter
$1 = 0x7fde58b92a00
(gdb) p/x counter->objData
$2 = 0x7fdbcbfc1680
(gdb) p/x (TObjectData *)counter->objData
$3 = 0x7fdbcbfc1680
(gdb) p/x counter->objData->klassOop
Cannot access memory at address 0x7fdbcbfc1698
(gdb) q
$ cat /tmp/gdb.log
#7 0x00007fdfebd0d3bd in findChildClass (this=0x7fdfee9e8d80) at snapShotContainer.hpp:277

277 while (counter->objData->klassOop != klassOop) {
$1 = 0x7fde58b92a00
$2 = 0x7fdbcbfc1680
$3 = 0x7fdbcbfc1680
Cannot access memory at address 0x7fdbcbfc1698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.