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 c++/15559] Method call and calling convention


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

--- Comment #12 from asmwarrior <asmwarrior at gmail dot com> ---
Hi, Domani Hannes, thanks for the patch. I just tested it, but it failed on
testing the sample code in comment 1 when I type "p v.size()".

The BT is below:
[debug]> bt 30
[debug]#0  0x005a0ed9 in dwarf2_per_cu_objfile (per_cu=0xbaadf00d) at
f:\build_gdb\binutils-gdb\gdb\dwarf2read.c:20999
[debug]#1  0x005b21a0 in dwarf2_find_location_expression (baton=0x302e7e8,
locexpr_length=0x2a4f234, pc=0) at
f:\build_gdb\binutils-gdb\gdb\dwarf2loc.c:214
[debug]#2  0x005b25b8 in loclist_find_frame_base_location (framefunc=0x302e7b8,
pc=0, start=0x2a4f238, length=0x2a4f234) at
f:\build_gdb\binutils-gdb\gdb\dwarf2loc.c:410
[debug]#3  0x00408d0f in i386_push_dummy_call (gdbarch=0x2f76480,
function=0x4daf590, regcache=0x4df70c0, bp_addr=2293391, nargs=1,
args=0x2a4f464, sp=2293376, struct_return=0, struct_addr=0) at
f:\build_gdb\binutils-gdb\gdb\i386-tdep.c:2561
[debug]#4  0x0053cdc6 in gdbarch_push_dummy_call (gdbarch=0x2f76480,
function=0x4daf590, regcache=0x4df70c0, bp_addr=2293391, nargs=1,
args=0x2a4f464, sp=2293376, struct_return=0, struct_addr=0) at
f:\build_gdb\binutils-gdb\gdb\gdbarch.c:2117
[debug]#5  0x00510299 in call_function_by_hand (function=0x4daf590, nargs=1,
args=0x2a4f464) at f:\build_gdb\binutils-gdb\gdb\infcall.c:752
[debug]#6  0x004d9658 in evaluate_subexp_standard (expect_type=0x0,
exp=0x4debb20, pos=0x2a4f84c, noside=EVAL_NORMAL) at
f:\build_gdb\binutils-gdb\gdb\eval.c:1764
[debug]#7  0x005d7040 in evaluate_subexp_c (expect_type=0x0, exp=0x4debb20,
pos=0x2a4f84c, noside=EVAL_NORMAL) at
f:\build_gdb\binutils-gdb\gdb\c-lang.c:720
[debug]#8  0x004d5a36 in evaluate_subexp (expect_type=0x0, exp=0x4debb20,
pos=0x2a4f84c, noside=EVAL_NORMAL) at f:\build_gdb\binutils-gdb\gdb\eval.c:70
[debug]#9  0x004d5bb5 in evaluate_expression (exp=0x4debb20) at
f:\build_gdb\binutils-gdb\gdb\eval.c:145
[debug]#10 0x004eec79 in print_command_1 (exp=0x2a4f9f2 "v.size()",
voidprint=1) at f:\build_gdb\binutils-gdb\gdb\printcmd.c:977
[debug]#11 0x004eed84 in print_command (exp=0x2a4f9f2 "v.size()", from_tty=1)
at f:\build_gdb\binutils-gdb\gdb\printcmd.c:1009
[debug]#12 0x0044d264 in do_cfunc (c=0x2f4f850, args=0x2a4f9f2 "v.size()",
from_tty=1) at f:\build_gdb\binutils-gdb\gdb\cli\cli-decode.c:107
[debug]#13 0x0044fb54 in cmd_func (cmd=0x2f4f850, args=0x2a4f9f2 "v.size()",
from_tty=1) at f:\build_gdb\binutils-gdb\gdb\cli\cli-decode.c:1886
[debug]#14 0x00611954 in execute_command (p=0x2a4f9f9 ")", from_tty=1) at
f:\build_gdb\binutils-gdb\gdb\top.c:458
[debug]#15 0x00457658 in safe_execute_command (command_uiout=0x2f72b08,
command=0x2a4f9f0 "p v.size()", from_tty=1) at
f:\build_gdb\binutils-gdb\gdb\cli\cli-interp.c:124
[debug]#16 0x004575d3 in cli_interpreter_exec (data=0x0, command_str=0x4c40758
"p v.size()") at f:\build_gdb\binutils-gdb\gdb\cli\cli-interp.c:107
[debug]#17 0x0052e452 in interp_exec (interp=0x2f72ba8, command_str=0x4c40758
"p v.size()") at f:\build_gdb\binutils-gdb\gdb\interps.c:356
[debug]#18 0x0045d878 in mi_cmd_interpreter_exec (command=0x78663d <procs+2845>
"-interpreter-exec", argv=0x2a4fad4, argc=2) at
f:\build_gdb\binutils-gdb\gdb\mi\mi-interp.c:246
[debug]#19 0x004623c3 in captured_mi_execute_command (uiout=0x2f79a38,
context=0x3014fa0) at f:\build_gdb\binutils-gdb\gdb\mi\mi-main.c:1985
[debug]#20 0x00462698 in mi_execute_command (cmd=0x4c40810 "p v.size()",
from_tty=1) at f:\build_gdb\binutils-gdb\gdb\mi\mi-main.c:2074
[debug]#21 0x0045d92a in mi_execute_command_wrapper (cmd=0x4c40810 "p
v.size()") at f:\build_gdb\binutils-gdb\gdb\mi\mi-interp.c:291
[debug]#22 0x0045d93d in mi_execute_command_input_handler (cmd=0x4c40810 "p
v.size()") at f:\build_gdb\binutils-gdb\gdb\mi\mi-interp.c:299
[debug]#23 0x00536bcd in gdb_readline2 (client_data=0x0) at
f:\build_gdb\binutils-gdb\gdb\event-top.c:713
[debug]#24 0x005364ad in stdin_event_handler (error=0, client_data=0x0) at
f:\build_gdb\binutils-gdb\gdb\event-top.c:375
[debug]#25 0x005356fa in handle_file_event (data=...) at
f:\build_gdb\binutils-gdb\gdb\event-loop.c:768
[debug]#26 0x00534e48 in process_event () at
f:\build_gdb\binutils-gdb\gdb\event-loop.c:342
[debug]#27 0x00534f0d in gdb_do_one_event () at
f:\build_gdb\binutils-gdb\gdb\event-loop.c:406
[debug]#28 0x00534f5e in start_event_loop () at
f:\build_gdb\binutils-gdb\gdb\event-loop.c:431
[debug]#29 0x0045d998 in mi_command_loop (data=0x2f79578) at
f:\build_gdb\binutils-gdb\gdb\mi\mi-interp.c:316
[debug](More stack frames follow...)

In the code:
struct objfile *objfile = per_cu->objfile;
I see that per_cu can't be accessed, see the log:
[debug]> whatis per_cu
[debug]type = struct dwarf2_per_cu_data *
[debug]>>>>>>cb_gdb:
[debug]> output per_cu
[debug](struct dwarf2_per_cu_data *) 0xbaadf00d>>>>>>cb_gdb:
[debug]> output *per_cu
[debug]Cannot access memory at address 0xbaadf00d
[debug]>>>>>>cb_gdb:

Yuanhui Zhang

-- 
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]