From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26215 invoked by alias); 26 Feb 2014 04:28:08 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 26176 invoked by uid 48); 26 Feb 2014 04:28:08 -0000 From: "asmwarrior at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/15559] Method call and calling convention Date: Wed, 26 Feb 2014 04:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: asmwarrior at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00292.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15559 --- Comment #12 from asmwarrior --- 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 "-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.