From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13565 invoked by alias); 22 Jul 2009 17:06:50 -0000 Received: (qmail 13548 invoked by uid 48); 22 Jul 2009 17:06:50 -0000 Date: Wed, 22 Jul 2009 17:06:00 -0000 Message-ID: <20090722170650.13547.qmail@sourceware.org> From: "marc dot khouzam at ericsson dot com" To: gdb-prs@sourceware.org In-Reply-To: <20090630110243.10347.andre.poenitz@nokia.com> References: <20090630110243.10347.andre.poenitz@nokia.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug mi/10347] gdb crashes with MI commands in hook-stop X-Bugzilla-Reason: CC 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 X-SW-Source: 2009-q3/txt/msg00013.txt.bz2 ------- Additional Comments From marc dot khouzam at ericsson dot com 2009-07-22 17:06 ------- This crash actually happens when using "interpreter mi" inside a define. It is not only with hook-stop. Below is an analysis from Paul P that comes from http://sourceware.org/ml/gdb/2009-07/msg00152.html -----Original Message----- From: Paul Pluzhnikov [mailto:ppluzhnikov@google.com] Sent: Tuesday, July 21, 2009 1:44 AM The problem is that in cli/cli-script.c, execute_user_command(), instream is set to NULL: 312 /* Set the instream to 0, indicating execution of a 313 user-defined function. */ 314 make_cleanup (do_restore_instream_cleanup, instream); 315 instream = (FILE *) 0; and later used for fileno(): #0 0x00007ffff6ea19f0 in fileno_unlocked () from /lib/libc.so.6 #1 0x000000000051d2ff in gdb_setup_readline () at ../../src/gdb/event-top.c:1086 #2 0x00000000004aaa09 in mi_interpreter_resume (data=0x0) at ../../src/gdb/mi/mi-interp.c:107 #3 0x00000000005180d7 in interp_set (interp=0xa7a850, top_level=0) at ../../src/gdb/interps.c:197 #4 0x000000000051834e in interpreter_exec_cmd (args=, from_tty=) at ../../src/gdb/interps.c:398 #5 0x0000000000459984 in execute_command (p=0xb295fd "t", from_tty=0) at ../../src/gdb/top.c:442 #6 0x00000000004a2c04 in execute_control_command (cmd=0xb23c40) at ../../src/gdb/cli/cli-script.c:400 #7 0x00000000004a31ad in execute_user_command (c=0xb3fd60, args=0x0) at ../../src/gdb/cli/cli-script.c:324 -- http://sourceware.org/bugzilla/show_bug.cgi?id=10347 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.