HP (Hewlett-Packard) 5992-1918 TV Antenna User Manual


 
0xc3ed2e38 <get_method_id()+0x98>: ldw,o 0(%r20),%r31
0xc3ed2e3c <get_method_id()+0x9c>: ldb -0xf1(%sp),%r7
0xc3ed2e40 <get_method_id()+0xa0>: extrw,u %r31,28,1,%r23
0xc3ed2e44 <get_method_id()+0xa4>: cmpb,od,n %r7,%r23,0xc3ed30dc <get_method_id()+0x33c>
0xc3ed2e48 <get_method_id()+0xa8>: call 0xc400c248 <methodOopDesc::jni_id(void)>
0xc3ed2e4c <get_method_id()+0xac>: copy %r9,%r26
0xc3ed2e50 <get_method_id()+0xb0>: ldw -0x20(%sp),%r19
0xc3ed2e54 <get_method_id()+0xb4>: ldw -0xd4(%sp),%rp
0xc3ed2e58 <get_method_id()+0xb8>: ldd -0xa8(%sp),%r10
0xc3ed2e5c <get_method_id()+0xbc>: extrd,u %r10,31,32,%r9
0xc3ed2e60 <get_method_id()+0xc0>: ldd -0xb0(%sp),%r8
0xc3ed2e64 <get_method_id()+0xc4>: ldd -0xb8(%sp),%r6
0xc3ed2e68 <get_method_id()+0xc8>: extrd,u %r8,31,32,%r7
0xc3ed2e6c <get_method_id()+0xcc>: extrd,u %r6,31,32,%r5
0xc3ed2e70 <get_method_id()+0xd0>: ldw -0xbc(%sp),%r4
0xc3ed2e74 <get_method_id()+0xd4>: ret
0xc3ed2e78 <get_method_id()+0xd8>: ldw,mb -0xc0(%sp),%r3
0xc3ed2e7c <get_method_id()+0xdc>: b,n 0xc3ed2e7c <get_method_id()+0xdc>
*** TARGET OF THE BRANCH AT OFFSET 0X64 ***
0xc3ed2e80 <get_method_id()+0xe0>: ldw 0x70(%r3),%r26
0xc3ed2e84 <get_method_id()+0xe4>: ldw 8(%r26),%ret0
0xc3ed2e88 <get_method_id()+0xe8>: ldo 4(%ret0),%r31
0xc3ed2e8c <get_method_id()+0xec>: ldw 0xc(%r26),%r21
0xc3ed2e90 <get_method_id()+0xf0>: cmpb,<<,n %r21,%r31,0xc3ed2f9c <get_method_id()+0x1fc>
0xc3ed2e94 <get_method_id()+0xf4>: stw %r31,8(%r26)
0xc3ed2e98 <get_method_id()+0xf8>: stw %r7,0(%ret0)
0xc3ed2e9c <get_method_id()+0xfc>: ldw 4(%r3),%rp
0xc3ed2ea0 <get_method_id()+0x100>: stw %ret0,-0x7c(%sp)
0xc3ed2ea4 <get_method_id()+0x104>: cmpb,<>,n %r0,%rp,0xc3ed2fb0 <get_method_id()+0x210>
0xc3ed2ea8 <get_method_id()+0x108>: cmpb,<> %r5,%r0,0xc3ed2fb8 <get_method_id()+0x218>
0xc3ed2eac <get_method_id()+0x10c>: stw %r0,-0x70(%sp)
0xc3ed2eb0 <get_method_id()+0x110>: addil L'-0xf000,%r19,%r1
0xc3ed2eb4 <get_method_id()+0x114>: ldw 0x360(%r1),%r7
0xc3ed2eb8 <get_method_id()+0x118>: ldo 0x3c4(%r7),%r22
0xc3ed2ebc <get_method_id()+0x11c>: stw %r22,-0x6c(%sp)
0xc3ed2ec0 <get_method_id()+0x120>: stw %r22,-0x70(%sp)
0xc3ed2ec4 <get_method_id()+0x124>: call 0xc3ec3ac8 <java_lang_Class::is_primitive(oopDesc *)>
*** POINT OF FAILURE; R6 IS 0 ***
0xc3ed2ec8 <get_method_id()+0x128>: ldw 0(%r6),%r26
Now let's examine specific instructions that pertain to the failure. You know that at the point of
the failure, R6 is equal to 0. You need to find out why. Do this by looking at the code to examine
where R6 is set. The first place R6 is set is at instruction get_method_id()+0x34:
0xc3ed2dd4 <get_method_id()+0x34>: copy %r25,%r6
In this instruction, general register R25, which holds the value for _jclass (the second parameter
passed to get_method_id()) is copied into general register R6.
Now trace the value passed into frame 9 by examining frame 10 and the contents of general
register R25. Look at the backtrace again. It reveals that the address for frame 10 is:
#10 0xc3ed34d0 in jni_GetStaticMethodID+0xf0 () from ./libjvm.sl
This address is the instruction at offset 0xf0 in the jni_GetStaticMethodID() function. This
is where the program returned from jni_GetStaticMethodID() to get_method_id().
Take this offset, which is a hexadecimal byte offset of the return point, divide it by 4, and add 1
in order to figure out the number of instructions from the beginning of the method to the return
instruction. Do this in gdb as follows:
(gdb) p 0xf0/4+1
$1 = 61
You can get the address of the start of the jni_GetStaticMethodID() function from frame
10. The address of jni_GetStaticMethodID()+0xf0 is 0xc3ed34d0 , so the start of
jni_GetStaticMethodID() is:
(gdb) p/x (0xc3ed34d0-0xf0)
$2 = 0xc3ed33e0
Now display the instructions for frame 10. Since there are 61 instructions to display, redirect the
output to a file:
(gdb) set redirect-file frame10instrs
(gdb) set redirect on
Redirecting output to frame10instrs.
4.7 Example gdb Session 71