Skip to content

Instantly share code, notes, and snippets.

@ykubota
Created July 26, 2016 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ykubota/ee0e84c860e9bc8364d560bb032f3dc3 to your computer and use it in GitHub Desktop.
Save ykubota/ee0e84c860e9bc8364d560bb032f3dc3 to your computer and use it in GitHub Desktop.
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
Copy link
Author

ykubota commented Jul 26, 2016

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

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

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

@wyukawa
Copy link

wyukawa 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