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


 
You want to display 75 instructions from the beginning of the get_method_id() function to
the point of failure for frame 9. Since this is a substantial number of instructions, redirect the
output to a file:
(gdb) set redirect-file frame9instrs
(gdb) set redirect on
Redirecting output to frame9instrs.
(gdb) x /75i 0xc3ed2da0
(gdb) set redirect off
You would probably print out this file to examine it in detail.
Let's examine the listing of the redirect file, frame9instrs. The parameters to the
get_method_id() function have been removed from the listing to improve readability. They
are set to the following values for all calls to get_method_id() in this listing:
(JNIEnv_ *, _jclass *, char *, char *, bool, Thread *)
A quick recap of PA-RISC calling conventions is in order before examining these 75 instructions
because you are going to be looking at the parameters passed into the function. When PA-RISC
applications pass parameters, they use general registers 26, 25, 24, and 23. Parameter 1 is passed
in general register 26, parameter 2 in general register 25, parameter 3 in general register 24, and
parameter 4 in general register 23. If there are more than four parameters to pass, the additional
ones are stored in the calling frame and picked up in the called frame.
Details about the assembly code follow the listing. The listing has been annotated with comments
for purposes of discussion:
$ more frame9instrs
0xc3ed2da0 <get_method_id()>: stw %rp,-0x14(%sp)
0xc3ed2da4 <get_method_id()+0x4>: depd %r5,31,32,%r6
0xc3ed2da8 <get_method_id()+0x8>: depd %r7,31,32,%r8
0xc3ed2dac <get_method_id()+0xc>: stw,ma %r3,0xc0(%sp)
0xc3ed2db0 <get_method_id()+0x10>: depd %r9,31,32,%r10
0xc3ed2db4 <get_method_id()+0x14>: ldw -0xf8(%sp),%r3
0xc3ed2db8 <get_method_id()+0x18>: stw %r4,-0xbc(%sp)
0xc3ed2dbc <get_method_id()+0x1c>: mfia %r4
0xc3ed2dc0 <get_method_id()+0x20>: addil L'-0x800,%r4,%r1
0xc3ed2dc4 <get_method_id()+0x24>: std %r6,-0xb8(%sp)
0xc3ed2dc8 <get_method_id()+0x28>: ldo 0x7e4(%r1),%r4
*** COPY PARAMETER 4 IN R23 TO R7
0xc3ed2dcc <get_method_id()+0x2c>: copy %r23,%r7
0xc3ed2dd0 <get_method_id()+0x30>: std %r8,-0xb0(%sp)
*** COPY PARAMETER 2 in R25 to R6 ***
0xc3ed2dd4 <get_method_id()+0x34>: copy %r25,%r6
*** COPY PARAMETER 3 IN R24 TO R5
0xc3ed2dd8 <get_method_id()+0x38>: copy %r24,%r5
0xc3ed2ddc <get_method_id()+0x3c>: std %r10,-0xa8(%sp)
0xc3ed2de0 <get_method_id()+0x40>: copy %r23,%r26
0xc3ed2de4 <get_method_id()+0x44>: call 0xc3eaeebc <strlen>
0xc3ed2de8 <get_method_id()+0x48>: stw %r19,-0x20(%sp)
0xc3ed2dec <get_method_id()+0x4c>: ldw -0x20(%sp),%r19
0xc3ed2df0 <get_method_id()+0x50>: copy %ret0,%r25
0xc3ed2df4 <get_method_id()+0x54>: copy %r7,%r26
0xc3ed2df8 <get_method_id()+0x58>: call 0xc40370d8 <oopFactory::new_symbol(char const *, int, Thread *)>
0xc3ed2dfc <get_method_id()+0x5c>: copy %r3,%r24
0xc3ed2e00 <get_method_id()+0x60>: ldw -0x20(%sp),%r19
*** COMPARE AND BRANCH TO GET_METHOD_ID()+0XE0 ***
0xc3ed2e04 <get_method_id()+0x64>: cmpb,<> %ret0,%r0,0xc3ed2e80 <get_method_id()+0xe0>
0xc3ed2e08 <get_method_id()+0x68>: copy %ret0,%r7
0xc3ed2e0c <get_method_id()+0x6c>: stw %r0,-0x7c(%sp)
0xc3ed2e10 <get_method_id()+0x70>: b 0xc3ed2ea4 <get_method_id()+0x104>
0xc3ed2e14 <get_method_id()+0x74>: ldw 4(%r3),%rp
0xc3ed2e18 <get_method_id()+0x78>: call 0xc3e7f230 <instanceKlass::
lookup_method_in_all_interfaces(symbolOopDesc *, symbolOopDesc *) const>
0xc3ed2e1c <get_method_id()+0x7c>: ldo 8(%r31),%r26
0xc3ed2e20 <get_method_id()+0x80>: ldw -0x20(%sp),%r19
0xc3ed2e24 <get_method_id()+0x84>: copy %ret0,%r9
0xc3ed2e28 <get_method_id()+0x88>: cmpb,=,n %r0,%r9,0xc3ed30dc <get_method_id()+0x33c>
0xc3ed2e2c <get_method_id()+0x8c>: ldw 0x28(%r9),%ret1
0xc3ed2e30 <get_method_id()+0x90>: stw %ret1,-0x40(%sp)
0xc3ed2e34 <get_method_id()+0x94>: ldo -0x40(%sp),%r20
70 Core File Analysis