From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23516 invoked by alias); 6 Feb 2006 21:41:44 -0000 Received: (qmail 23507 invoked by uid 22791); 6 Feb 2006 21:41:43 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.200) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Feb 2006 21:41:42 +0000 Received: by zproxy.gmail.com with SMTP id 40so1221213nzk for ; Mon, 06 Feb 2006 13:41:40 -0800 (PST) Received: by 10.64.183.9 with SMTP id g9mr418649qbf; Mon, 06 Feb 2006 13:41:38 -0800 (PST) Received: by 10.65.20.10 with HTTP; Mon, 6 Feb 2006 13:41:38 -0800 (PST) Message-ID: <7f45d9390602061341u6bb5bbcap795e427b137179e5@mail.gmail.com> Date: Mon, 06 Feb 2006 21:41:00 -0000 From: Shaun Jackman Reply-To: Shaun Jackman To: gdb@sources.redhat.com Subject: arm-elf-gdb segfault in get_frame_pc MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00031.txt.bz2 arm-elf-gdb segfaulted as I started single stepping through an inline assembler macro, start_thread. Thanks, Shaun $ arm-elf-gdb _build/kernel/kernel GNU gdb 6.4.50.20060206-cvs ... This GDB was configured as "--host=3Dx86_64-unknown-linux-gnu --target=3Dar= m-elf"... (gdb) target remote bdi:2001 Remote debugging using bdi:2001 0x02080000 in ?? () (gdb) load Loading section .text, size 0xf534 lma 0x2000000 Loading section .rodata, size 0x17b4 lma 0x200f534 Loading section .data, size 0x13a4 lma 0x2010de8 Start address 0x2000000, load size 73868 Transfer rate: 203003 bits/sec, 959 bytes/write. (gdb) c Current language: auto; currently asm CPSR: 0xdf IRQ FIQ MODE_SYS Program received signal SIGSTOP, Stopped (signal). 0x02007908 in dcc_read (fd=3D, buf=3D0x20645d0, count= =3D1024) at ../../drivers/dcc.c:48 48 if (n > 0) return n; Current language: auto; currently c (gdb) l load_bflt ... (gdb) b 28 Breakpoint 1 at 0x2000310: file ../../kernel/bflt.c, line 28. (gdb) c Continuing. Breakpoint 1, load_bflt (src=3D0x10a4000, n=3D) at ../../kernel/bflt.c:28 28 if (setjmp(proc.kcontext) =3D=3D 0) (gdb) s setjmp () at ../../../../../../../newlib/libc/machine/arm/setjmp.S:98 98 FUNC_START setjmp Current language: auto; currently asm (gdb) .arm_start_of.setjmp () at ../../../../../../../newlib/libc/machine/arm/setjmp.S:101 101 stmea a1!, { v1-v7, fp, ip, sp, lr } (gdb) 110 mov a1, #0 (gdb) 112 FUNC_END setjmp (gdb) load_bflt (src=3D0x10a4000, n=3D) at ../../kernel/bflt= .c:29 29 start_thread(entry, &proc.ucontext); Current language: auto; currently c (gdb) Segmentation fault (core dumped) $ gdb ~/bin/arm-elf-gdb core GNU gdb 6.3-debian ... This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". Core was generated by `arm-elf-gdb _build/kernel/kernel'. Program terminated with signal 11, Segmentation fault. warning: current_sos: Can't read pathname for load map: Input/output error ... #0 0x0813dc99 in get_frame_pc (frame=3D0x0) at ../../gdb/frame.c:1321 1321 gdb_assert (frame->next !=3D NULL); (gdb) bt #0 0x0813dc99 in get_frame_pc (frame=3D0x0) at ../../gdb/frame.c:1321 #1 0x080bec2c in insert_step_resume_breakpoint_at_frame (return_frame=3D0x= 0) at ../../gdb/infrun.c:2760 #2 0x080c20ed in handle_inferior_event (ecs=3D0xbfec8e20) at ../../gdb/infrun.c:2531 #3 0x080c27a8 in wait_for_inferior () at ../../gdb/infrun.c:1001 #4 0x080c2a75 in proceed (addr=3D1, siggnal=3DTARGET_SIGNAL_DEFAULT, step= =3D1) at ../../gdb/infrun.c:826 #5 0x080bc069 in step_1 (skip_subroutines=3D0, single_inst=3D0, count_stri= ng=3D0x0) at ../../gdb/infcmd.c:757 #6 0x08050803 in execute_command (p=3D0x8298991 "", from_tty=3D1) at ../../gdb/top.c:448 #7 0x080ccec2 in command_handler (command=3D0x8298990 "s") at ../../gdb/event-top.c:508 #8 0x080cd465 in command_line_handler (rl=3D0x82bb6b8 "") at ../../gdb/event-top.c:799 #9 0x081972a5 in rl_callback_read_char () at ../../readline/callback.c:123 #10 0x080cc83b in rl_callback_read_char_wrapper (client_data=3D0x0) at ../../gdb/event-top.c:174 #11 0x080cc02e in handle_file_event (event_file_desc=3D0) at ../../gdb/event-loop.c:728 #12 0x080cbaf6 in process_event () at ../../gdb/event-loop.c:341 #13 0x080cc365 in gdb_do_one_event (data=3D0x0) at ../../gdb/event-loop.c:3= 78 #14 0x080c95ac in catch_errors (func=3D0x80cc240 , func_args=3D0x0, errstring=3D0x81f344f "", mask=3D6) at ../../gdb/exceptions.c:515 #15 0x0807f213 in tui_command_loop (data=3D0x0) at ../../gdb/tui/tui-interp= .c:151 #16 0x080c986c in current_interp_command_loop () at ../../gdb/interps.c:278 #17 0x0804b9eb in captured_command_loop (data=3D0x0) at ../../gdb/main.c:101 #18 0x080c95ac in catch_errors (func=3D0x804b9e0 , func_args=3D0x0, errstring=3D0x81f344f "", mask=3D6) at ../../gdb/exceptions.c:515 #19 0x0804c093 in captured_main (data=3D0x0) at ../../gdb/main.c:834 #20 0x080c95ac in catch_errors (func=3D0x804ba20 , func_args=3D0xbfec9300, errstring=3D0x81f344f "", mask=3D6) at ../../gdb/exceptions.c:515 #21 0x0804c833 in gdb_main (args=3D0x0) at ../../gdb/main.c:843 #22 0x0804b9cd in main (argc=3D0, argv=3D0x0) at ../../gdb/gdb.c:35 (gdb)