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 gdb/19947] target_read should return more about xfer status


https://sourceware.org/bugzilla/show_bug.cgi?id=19947

--- Comment #6 from Yao Qi <qiyao at gcc dot gnu.org> ---
Looks my words in comment #0 are incorrect.

The exception MEMORY_ERROR is thrown from read_code,

 #0  memory_error (err=err@entry=TARGET_XFER_E_IO,
memaddr=memaddr@entry=140737349781158) at
/home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:217
 #1  0x000000000065f5ba in read_code (memaddr=memaddr@entry=140737349781158,
myaddr=myaddr@entry=0x7fffffffd7b0 "\340\023<\001", len=len@entry=1)
     at /home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:288
 #2  0x000000000065f7b5 in read_code_unsigned_integer
(memaddr=memaddr@entry=140737349781158, len=len@entry=1,
byte_order=byte_order@entry=BFD_ENDIAN_LITTLE)
     at /home/yao/SourceCode/gnu/gdb/git/gdb/corefile.c:363
 #3  0x00000000004717e0 in amd64_analyze_prologue
(gdbarch=gdbarch@entry=0x13c13e0, pc=140737349781158,
current_pc=140737349781165, cache=cache@entry=0xda0cb0)
     at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2267
 #4  0x0000000000471f6d in amd64_frame_cache_1 (cache=0xda0cb0,
this_frame=0xda0bf0) at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2437
 #5  amd64_frame_cache (this_frame=0xda0bf0, this_cache=<optimised out>) at
/home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2508
 #6  0x000000000047214d in amd64_frame_this_id (this_frame=<optimised out>,
this_cache=<optimised out>, this_id=0xda0c50)
     at /home/yao/SourceCode/gnu/gdb/git/gdb/amd64-tdep.c:2541
 #7  0x00000000006b94c4 in compute_frame_id (fi=0xda0bf0) at
/home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:481
 #8  get_prev_frame_if_no_cycle (this_frame=this_frame@entry=0xda0b20) at
/home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1809
 #9  0x00000000006bb6c9 in get_prev_frame_always_1 (this_frame=0xda0b20) at
/home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1983
 #10 get_prev_frame_always (this_frame=this_frame@entry=0xda0b20) at
/home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1999
 #11 0x00000000006bbe11 in get_prev_frame
(this_frame=this_frame@entry=0xda0b20) at
/home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:2241
 #12 0x00000000006bc13c in unwind_to_current_frame (ui_out=<optimised out>,
args=args@entry=0xda0b20) at /home/yao/SourceCode/gnu/gdb/git/gdb/frame.c:1485

what we should do is to throw the right exception in read_code, the same as
what read_memory is doing today.  Returning xfer status in target_read is still
useful, but not necessary for this bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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