Article View: gnu.gdb.bug
Article #1151GDB crashes while single stepping in ARM
From: Tribhuwan Kandpal
Date: Mon, 11 Jun 2007 16:44
Date: Mon, 11 Jun 2007 16:44
698 lines
66092 bytes
66092 bytes
--0-722748746-1181580271=:90003
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi,
I was trying to single step on a simple helloworld kind of program on a remote machine(arm target board) using gdb-gdbserver, having printf in it but as I single stepped printf it caused crash of gdb.
My gdb is a cross gdb compiled for arm.
Then I tried to run my cross gdb in my system gdb and got the following info about crash:
Code that was tested:
#include<stdio.h>
//using namespace std;
void Jump();
int main()
{
// cout<<"Hello World";
// cout<<"\nhere we go";
printf("\nUsing Printf");
Jump();
printf("\nWow Amazing!!!");
printf("\n1");
printf("\n1");
// cout<<"\nWe r back";
return 0;
}
void Jump()
{
// cout<<"\nWe jumped here";
printf("\nIt may work");
printf("\n1");
printf("\n1");
printf("\n1");
printf("\n1");
printf("\n1");
}
GDB Server output:
-bash-2.05b# ./gdbserver 172.16.137.45:5436 a.out
Process a.out created; pid = 498
Listening on port 5436
Remote debugging from host 172.16.137.45
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
Listening on port 5436
Remote debugging from host 172.16.137.45
Using Printf
It may work
1
1
1
1
1
Wow Amazing!!!
1
1
Child exited with retcode = 0
Child exited with status 0
GDBserver exiting
GDB Output:
host:~/gdb-6.3/gdb[69] (** NONE **)>gdb ./gdb
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db lib rary "/lib/tls/libthread_db.so.1".
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x805559f: file utils.c, line 849.
Breakpoint 2 at 0x807493a: file ./cli/cli-cmds.c, line 193.
(top-gdb) file ./gdb
Load new symbol table from "/auto_home/kandpal/gdb-6.3/gdb/gdb"? (y or n) y
Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/gdb...done.
(top-gdb) r
Starting program: /auto_home/kandpal/gdb-6.3/gdb/gdb
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=armv5tl-montavista -linuxeabi".
Setting up the environment for debugging gdb.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
.gdbinit:8: Error in sourced command file:
No breakpoint number 0.
(gdb) set solib-absolute-prefix /opt/montavista/mobilinux/devkit/arm/v5t_le/targ et
(gdb) file a.out
Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/a.out...done.
(gdb) target remote 172.16.136.119:5436
Remote debugging using 172.16.136.119:5436
0x40000790 in ?? ()
(gdb) br main
Breakpoint 1 at 0x8420: file helloworld.cpp, line 10.
(gdb) c
Continuing.
Breakpoint 1, main () at helloworld.cpp:10
10 printf("\nUsing Printf");
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x08059865 in get_frame_pc (frame=0x0) at frame.c:1244
1244 gdb_assert (frame->next != NULL);
(top-gdb) bt
#0 0x08059865 in get_frame_pc (frame=0x0) at frame.c:1244
During symbol reading, Incomplete CFI data; unspecified register eax at 0x08059891.
#1 0x080b9a9c in insert_step_resume_breakpoint_at_frame (return_frame=0x0)
at infrun.c:2670
#2 0x080bc7b8 in handle_inferior_event (ecs=0xbfe247e0) at infrun.c:2449
#3 0x080bcdbe in wait_for_inferior () at infrun.c:991
#4 0x080bcef1 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
step=1) at infrun.c:814
#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)
at infcmd.c:688
#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733
#7 0x080c5a00 in command_handler (command=0x976f8e8 "s") at event-top.c:500
#8 0x080c5fde in command_line_handler (rl=0x97ceab0 "P�{\t")
at event-top.c:793
#9 0x0817c1fe in rl_callback_read_char () at callback.c:123
#10 0x080c53a7 in rl_callback_read_char_wrapper (client_data=0x0)
at event-top.c:166
#11 0x080c4cb0 in handle_file_event (event_file_desc=0) at event-loop.c:721
#12 0x080c47ca in process_event () at event-loop.c:334
#13 0x080c4f4d in gdb_do_one_event (data=0x0) at event-loop.c:371
#14 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,
func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
---Type <return> to continue, or q <return> to quit---
#15 0x080533da in catch_errors (func=0x80c4e38 <gdb_do_one_event>,
func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536
#16 0x0807e31b in tui_command_loop (data=0x0) at ./tui/tui-interp.c:150
#17 0x080c29d7 in current_interp_command_loop () at interps.c:277
#18 0x0804b7a7 in captured_command_loop (data=0x0) at ./main.c:91
#19 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,
func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
#20 0x080533da in catch_errors (func=0x804b79c <captured_command_loop>,
func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536
#21 0x0804bea3 in captured_main (data=0xbfe24fc0) at ./main.c:801
#22 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,
func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
#23 0x080533da in catch_errors (func=0x804b7d4 <captured_main>,
func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6) at top.c:536
#24 0x0804c55f in gdb_main (args=0xffffffff) at ./main.c:810
#25 0x0804b795 in main (argc=0, argv=0x0) at gdb.c:35
(top-gdb) frame 5
#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)
at infcmd.c:688
688 proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
(top-gdb) info args
skip_subroutines = 0
single_inst = 0
count_string = 0x0
(top-gdb) l top.c:733
728 else if (!cmd_func_p (c))
729 error ("That is not a command, just a help topic.");
730 else if (deprecated_call_command_hook)
731 deprecated_call_command_hook (c, arg, from_tty & caution);
732 else
733 cmd_func (c, arg, from_tty & caution);
734
735 /* If this command has been post-hooked, run the hook last. */
736 execute_cmd_post_hook (c);
737
(top-gdb) frame 6
#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733
733 cmd_func (c, arg, from_tty & caution);
(top-gdb) l top.c:730
725 execute_user_command (c, arg);
726 else if (c->type == set_cmd || c->type == show_cmd)
727 do_setshow_command (arg, from_tty & caution, c);
728 else if (!cmd_func_p (c))
729 error ("That is not a command, just a help topic.");
730 else if (deprecated_call_command_hook)
731 deprecated_call_command_hook (c, arg, from_tty & caution);
732 else
733 cmd_func (c, arg, from_tty & caution);
734
(top-gdb) info args
p = 0x976f8e9 ""
from_tty = 1
(top-gdb) frame
#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733
733 cmd_func (c, arg, from_tty & caution);
(top-gdb) info frame
Stack level 6, frame at 0xbfe24930:
eip = 0x80536e4 in execute_command (top.c:733); saved eip 0x80c5a00
called by frame at 0xbfe24960, caller of frame at 0xbfe24900
source language c.
Arglist at 0xbfe24928, args: p=0x976f8e9 "", from_tty=1
Locals at 0xbfe24928, Previous frame's sp is 0xbfe24930
Saved registers:
ebx at 0xbfe2491c, ebp at 0xbfe24928, esi at 0xbfe24920, edi at 0xbfe24924,
eip at 0xbfe2492c
(top-gdb)
(top-gdb) frame 1
#1 0x080b9a9c in insert_step_resume_breakpoint_at_frame (return_frame=0x0)
at infrun.c:2670
2670 sr_sal.pc = ADDR_BITS_REMOVE (get_frame_pc (return_frame));
(top-gdb) info frame
Stack level 1, frame at 0xbfe246f0:
eip = 0x80b9a9c in insert_step_resume_breakpoint_at_frame (infrun.c:2670);
saved eip 0x80bc7b8
called by frame at 0xbfe247d0, caller of frame at 0xbfe24690
source language c.
Arglist at 0xbfe246e8, args: return_frame=0x0
Locals at 0xbfe246e8, Previous frame's sp is 0xbfe246f0
Saved registers:
ebx at 0xbfe246dc, ebp at 0xbfe246e8, esi at 0xbfe246e0, edi at 0xbfe246e4,
eip at 0xbfe246ec
(top-gdb) frame 2
#2 0x080bc7b8 in handle_inferior_event (ecs=0xbfe247e0) at infrun.c:2449
2449 insert_step_resume_breakpoint_at_frame (get_prev_frame (get_current_frame ()));
(top-gdb) info frame
Stack level 2, frame at 0xbfe247d0:
eip = 0x80bc7b8 in handle_inferior_event (infrun.c:2449); saved eip 0x80bcdbe
called by frame at 0xbfe24890, caller of frame at 0xbfe246f0
source language c.
Arglist at 0xbfe247c8, args: ecs=0xbfe247e0
Locals at 0xbfe247c8, Previous frame's sp is 0xbfe247d0
Saved registers:
ebx at 0xbfe247bc, ebp at 0xbfe247c8, esi at 0xbfe247c0, edi at 0xbfe247c4,
eip at 0xbfe247cc
(top-gdb) frame 3
#3 0x080bcdbe in wait_for_inferior () at infrun.c:991
991 handle_inferior_event (ecs);
(top-gdb) info frame
Stack level 3, frame at 0xbfe24890:
eip = 0x80bcdbe in wait_for_inferior (infrun.c:991); saved eip 0x80bcef1
called by frame at 0xbfe248d0, caller of frame at 0xbfe247d0
source language c.
Arglist at 0xbfe24888, args:
Locals at 0xbfe24888, Previous frame's sp is 0xbfe24890
Saved registers:
ebx at 0xbfe2487c, ebp at 0xbfe24888, esi at 0xbfe24880, edi at 0xbfe24884,
eip at 0xbfe2488c
(top-gdb) frame 4
#4 0x080bcef1 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
step=1) at infrun.c:814
814 wait_for_inferior ();
(top-gdb) info frame
Stack level 4, frame at 0xbfe248d0:
eip = 0x80bcef1 in proceed (infrun.c:814); saved eip 0x80b7692
called by frame at 0xbfe24900, caller of frame at 0xbfe24890
source language c.
Arglist at 0xbfe248c8, args: addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,
step=1
Locals at 0xbfe248c8, Previous frame's sp is 0xbfe248d0
Saved registers:
ebx at 0xbfe248bc, ebp at 0xbfe248c8, esi at 0xbfe248c0, edi at 0xbfe248c4,
eip at 0xbfe248cc
(top-gdb) frame 5
#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)
at infcmd.c:688
688 proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
(top-gdb) info frame
Stack level 5, frame at 0xbfe24900:
eip = 0x80b7692 in step_1 (infcmd.c:688); saved eip 0x80536e4
called by frame at 0xbfe24930, caller of frame at 0xbfe248d0
source language c.
Arglist at 0xbfe248f8, args: skip_subroutines=0, single_inst=0,
count_string=0x0
Locals at 0xbfe248f8, Previous frame's sp is 0xbfe24900
Saved registers:
ebx at 0xbfe248ec, ebp at 0xbfe248f8, esi at 0xbfe248f0, edi at 0xbfe248f4,
eip at 0xbfe248fc
(top-gdb) frame 6
#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733
733 cmd_func (c, arg, from_tty & caution);
(top-gdb) info frame
Stack level 6, frame at 0xbfe24930:
eip = 0x80536e4 in execute_command (top.c:733); saved eip 0x80c5a00
called by frame at 0xbfe24960, caller of frame at 0xbfe24900
source language c.
Arglist at 0xbfe24928, args: p=0x976f8e9 "", from_tty=1
Locals at 0xbfe24928, Previous frame's sp is 0xbfe24930
Saved registers:
ebx at 0xbfe2491c, ebp at 0xbfe24928, esi at 0xbfe24920, edi at 0xbfe24924,
eip at 0xbfe2492c
(top-gdb) frame 7
#7 0x080c5a00 in command_handler (command=0x976f8e8 "s") at event-top.c:500
500 execute_command (command, instream == stdin);
(top-gdb) info frame
Stack level 7, frame at 0xbfe24960:
eip = 0x80c5a00 in command_handler (event-top.c:500); saved eip 0x80c5fde
called by frame at 0xbfe24990, caller of frame at 0xbfe24930
source language c.
Arglist at 0xbfe24958, args: command=0x976f8e8 "s"
Locals at 0xbfe24958, Previous frame's sp is 0xbfe24960
Saved registers:
ebx at 0xbfe2494c, ebp at 0xbfe24958, esi at 0xbfe24950, edi at 0xbfe24954,
eip at 0xbfe2495c
(top-gdb) frame 8
#8 0x080c5fde in command_line_handler (rl=0x97ceab0 "P�{\t")
at event-top.c:793
793 command_handler (line);
(top-gdb) info frame
Stack level 8, frame at 0xbfe24990:
eip = 0x80c5fde in command_line_handler (event-top.c:793); saved eip 0x817c1fe
called by frame at 0xbfe249b0, caller of frame at 0xbfe24960
source language c.
Arglist at 0xbfe24988, args: rl=0x97ceab0 "P�{\t"
Locals at 0xbfe24988, Previous frame's sp is 0xbfe24990
Saved registers:
ebx at 0xbfe2497c, ebp at 0xbfe24988, esi at 0xbfe24980, edi at 0xbfe24984,
eip at 0xbfe2498c
(top-gdb) frame 9
#9 0x0817c1fe in rl_callback_read_char () at callback.c:123
123 (*rl_linefunc) (line);
(top-gdb) info frame
Stack level 9, frame at 0xbfe249b0:
eip = 0x817c1fe in rl_callback_read_char (callback.c:123); saved eip 0x80c53a7
called by frame at 0xbfe249c0, caller of frame at 0xbfe24990
source language c.
Arglist at 0xbfe249a8, args:
Locals at 0xbfe249a8, Previous frame's sp is 0xbfe249b0
Saved registers:
ebx at 0xbfe249a4, ebp at 0xbfe249a8, esi at 0xbfe24980, edi at 0xbfe24984,
eip at 0xbfe249ac
(top-gdb) frame 10
#10 0x080c53a7 in rl_callback_read_char_wrapper (client_data=0x0)
at event-top.c:166
166 rl_callback_read_char ();
(top-gdb) info frame
Stack level 10, frame at 0xbfe249c0:
eip = 0x80c53a7 in rl_callback_read_char_wrapper (event-top.c:166);
saved eip 0x80c4cb0
called by frame at 0xbfe249e0, caller of frame at 0xbfe249b0
source language c.
Arglist at 0xbfe249b8, args: client_data=0x0
Locals at 0xbfe249b8, Previous frame's sp is 0xbfe249c0
Saved registers:
ebx at 0xbfe249a4, ebp at 0xbfe249b8, esi at 0xbfe24980, edi at 0xbfe24984,
eip at 0xbfe249bc
(top-gdb) frame 11
#11 0x080c4cb0 in handle_file_event (event_file_desc=0) at event-loop.c:721
721 (*file_ptr->proc) (file_ptr->error, file_ptr->client_data);
(top-gdb) info frame
Stack level 11, frame at 0xbfe249e0:
eip = 0x80c4cb0 in handle_file_event (event-loop.c:721); saved eip 0x80c47ca
called by frame at 0xbfe24a00, caller of frame at 0xbfe249c0
source language c.
Arglist at 0xbfe249d8, args: event_file_desc=0
Locals at 0xbfe249d8, Previous frame's sp is 0xbfe249e0
Saved registers:
ebx at 0xbfe249d0, ebp at 0xbfe249d8, esi at 0xbfe249d4, edi at 0xbfe24984,
eip at 0xbfe249dc
(top-gdb) frame 12
#12 0x080c47ca in process_event () at event-loop.c:334
334 (*proc) (fd);
(top-gdb) info frame
Stack level 12, frame at 0xbfe24a00:
eip = 0x80c47ca in process_event (event-loop.c:334); saved eip 0x80c4f4d
called by frame at 0xbfe24a30, caller of frame at 0xbfe249e0
source language c.
Arglist at 0xbfe249f8, args:
Locals at 0xbfe249f8, Previous frame's sp is 0xbfe24a00
Saved registers:
ebx at 0xbfe249f0, ebp at 0xbfe249f8, esi at 0xbfe249f4, edi at 0xbfe24984,
eip at 0xbfe249fc
(top-gdb) frame 13
#13 0x080c4f4d in gdb_do_one_event (data=0x0) at event-loop.c:371
371 if (process_event ())
(top-gdb) info frame
Stack level 13, frame at 0xbfe24a30:
eip = 0x80c4f4d in gdb_do_one_event (event-loop.c:371); saved eip 0x805328a
called by frame at 0xbfe24b10, caller of frame at 0xbfe24a00
source language c.
Arglist at 0xbfe24a28, args: data=0x0
Locals at 0xbfe24a28, Previous frame's sp is 0xbfe24a30
Saved registers:
ebx at 0xbfe24a1c, ebp at 0xbfe24a28, esi at 0xbfe24a20, edi at 0xbfe24a24,
eip at 0xbfe24a2c
(top-gdb) frame 14
#14 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,
func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
431 val = (*func) (func_uiout, func_args);
(top-gdb) info frame
Stack level 14, frame at 0xbfe24b10:
eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da
called by frame at 0xbfe24b50, caller of frame at 0xbfe24a30
source language c.
Arglist at 0xbfe24b08, args: func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,
func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
(top-gdb) frame 15
#15 0x080533da in catch_errors (func=0x80c4e38 <gdb_do_one_event>,
func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536
536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,
(top-gdb) info frame
Stack level 15, frame at 0xbfe24b50:
eip = 0x80533da in catch_errors (top.c:536); saved eip 0x807e31b
called by frame at 0xbfe24b90, caller of frame at 0xbfe24b10
source language c.
Arglist at 0xbfe24b48, args: func=0x80c4e38 <gdb_do_one_event>,
func_args=0x0, errstring=0x8196819 "", mask=6
Locals at 0xbfe24b48, Previous frame's sp is 0xbfe24b50
Saved registers:
ebx at 0xbfe24b00, ebp at 0xbfe24b48, esi at 0xbfe24b04, edi at 0xbfe24a24,
eip at 0xbfe24b4c
(top-gdb) frame 16
#16 0x0807e31b in tui_command_loop (data=0x0) at ./tui/tui-interp.c:150
150 int result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
(top-gdb) info frame
Stack level 16, frame at 0xbfe24b90:
eip = 0x807e31b in tui_command_loop (./tui/tui-interp.c:150);
saved eip 0x80c29d7
called by frame at 0xbfe24bb0, caller of frame at 0xbfe24b50
source language c.
Arglist at 0xbfe24b88, args: data=0x0
Locals at 0xbfe24b88, Previous frame's sp is 0xbfe24b90
Saved registers:
ebx at 0xbfe24b7c, ebp at 0xbfe24b88, esi at 0xbfe24b80, edi at 0xbfe24b84,
eip at 0xbfe24b8c
(top-gdb) frame 17
#17 0x080c29d7 in current_interp_command_loop () at interps.c:277
277 current_interpreter->procs->command_loop_proc (current_interpreter->data);
(top-gdb) info frame
Stack level 17, frame at 0xbfe24bb0:
eip = 0x80c29d7 in current_interp_command_loop (interps.c:277);
saved eip 0x804b7a7
called by frame at 0xbfe24bc0, caller of frame at 0xbfe24b90
source language c.
Arglist at 0xbfe24ba8, args:
Locals at 0xbfe24ba8, Previous frame's sp is 0xbfe24bb0
Saved registers:
ebx at 0xbfe24b7c, ebp at 0xbfe24ba8, esi at 0xbfe24b80, edi at 0xbfe24b84,
eip at 0xbfe24bac
(top-gdb) frame 18
#18 0x0804b7a7 in captured_command_loop (data=0x0) at ./main.c:91
91 current_interp_command_loop ();
(top-gdb) info frame
Stack level 18, frame at 0xbfe24bc0:
eip = 0x804b7a7 in captured_command_loop (./main.c:91); saved eip 0x805328a
called by frame at 0xbfe24ca0, caller of frame at 0xbfe24bb0
source language c.
Arglist at 0xbfe24bb8, args: data=0x0
Locals at 0xbfe24bb8, Previous frame's sp is 0xbfe24bc0
Saved registers:
ebx at 0xbfe24b7c, ebp at 0xbfe24bb8, esi at 0xbfe24b80, edi at 0xbfe24b84,
eip at 0xbfe24bbc
(top-gdb) frame 19
#19 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,
func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
431 val = (*func) (func_uiout, func_args);
(top-gdb) info frame
Stack level 19, frame at 0xbfe24ca0:
eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da
called by frame at 0xbfe24ce0, caller of frame at 0xbfe24bc0
source language c.
Arglist at 0xbfe24c98, args: func=0x8053390 <do_catch_errors>,
func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,
func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
(top-gdb) frame 20
#20 0x080533da in catch_errors (func=0x804b79c <captured_command_loop>,
func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536
536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,
(top-gdb) info frame
Stack level 20, frame at 0xbfe24ce0:
eip = 0x80533da in catch_errors (top.c:536); saved eip 0x804bea3
called by frame at 0xbfe24e60, caller of frame at 0xbfe24ca0
source language c.
Arglist at 0xbfe24cd8, args: func=0x804b79c <captured_command_loop>,
func_args=0x0, errstring=0x8196819 "", mask=6
Locals at 0xbfe24cd8, Previous frame's sp is 0xbfe24ce0
Saved registers:
ebx at 0xbfe24c90, ebp at 0xbfe24cd8, esi at 0xbfe24c94, edi at 0xbfe24b84,
eip at 0xbfe24cdc
#21 0x0804bea3 in captured_main (data=0xbfe24fc0) at ./main.c:801
801 catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);
(top-gdb) info frame
Stack level 21, frame at 0xbfe24e60:
eip = 0x804bea3 in captured_main (./main.c:801); saved eip 0x805328a
called by frame at 0xbfe24f40, caller of frame at 0xbfe24ce0
source language c.
Arglist at 0xbfe24e58, args: data=0xbfe24fc0
Locals at 0xbfe24e58, Previous frame's sp is 0xbfe24e60
Saved registers:
ebx at 0xbfe24e4c, ebp at 0xbfe24e58, esi at 0xbfe24e50, edi at 0xbfe24e54,
eip at 0xbfe24e5c
(top-gdb) frame 22
#22 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,
func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,
func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
)
at top.c:431
431 val = (*func) (func_uiout, func_args);
(top-gdb) info frame
Stack level 22, frame at 0xbfe24f40:
eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da
called by frame at 0xbfe24f80, caller of frame at 0xbfe24e60
source language c.
Arglist at 0xbfe24f38, args: func=0x8053390 <do_catch_errors>,
func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,
func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.
(top-gdb) frame 23
#23 0x080533da in catch_errors (func=0x804b7d4 <captured_main>,
func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6) at top.c:536
536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,
(top-gdb) info frame
Stack level 23, frame at 0xbfe24f80:
eip = 0x80533da in catch_errors (top.c:536); saved eip 0x804c55f
called by frame at 0xbfe24fa0, caller of frame at 0xbfe24f40
source language c.
Arglist at 0xbfe24f78, args: func=0x804b7d4 <captured_main>,
func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6
Locals at 0xbfe24f78, Previous frame's sp is 0xbfe24f80
Saved registers:
ebx at 0xbfe24f30, ebp at 0xbfe24f78, esi at 0xbfe24f34, edi at 0xbfe24e54,
eip at 0xbfe24f7c
(top-gdb) frame 24
#24 0x0804c55f in gdb_main (args=0xffffffff) at ./main.c:810
810 catch_errors (captured_main, args, "", RETURN_MASK_ALL);
(top-gdb) info frame
Stack level 24, frame at 0xbfe24fa0:
eip = 0x804c55f in gdb_main (./main.c:810); saved eip 0x804b795
called by frame at 0xbfe24fe0, caller of frame at 0xbfe24f80
source language c.
Arglist at 0xbfe24f98, args: args=0xffffffff
Locals at 0xbfe24f98, Previous frame's sp is 0xbfe24fa0
Saved registers:
ebx at 0xbfe24f30, ebp at 0xbfe24f98, esi at 0xbfe24f34, edi at 0xbfe24e54,
eip at 0xbfe24f9c
(top-gdb) frame 25
#25 0x0804b795 in main (argc=0, argv=0x0) at gdb.c:35
35 return gdb_main (&args);
(top-gdb) info frame
Stack level 25, frame at 0xbfe24fe0:
eip = 0x804b795 in main (gdb.c:35); saved eip 0x17bde3
caller of frame at 0xbfe24fa0
source language c.
Arglist at 0xbfe24fd8, args: argc=0, argv=0x0
Locals at 0xbfe24fd8, Previous frame's sp is 0xbfe24fe0
Saved registers:
ebx at 0xbfe24f30, ebp at 0xbfe24fd8, esi at 0xbfe24f34, edi at 0xbfe24fd4,
eip at 0xbfe24fdc
Running again will result in sucess:
(top-gdb) file ./gdb
Load new symbol table from "/auto_home/kandpal/gdb-6.3/gdb/gdb"? (y or n) y
Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/gdb...done.
(top-gdb) r
Starting program: /auto_home/kandpal/gdb-6.3/gdb/gdb
Warning - cannot source /icl-tools/common/common_cshrc
/icl-tools/bin/query_proj.pl: Command not found.
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=armv5tl-montavista-linuxeabi".
Setting up the environment for debugging gdb.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
.gdbinit:8: Error in sourced command file:
No breakpoint number 0.
(gdb) file a.out
Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/a.out...done.
(gdb) target remote 172.16.136.119:5436
Remote debugging using 172.16.136.119:5436
0x400699a0 in ?? ()
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
(gdb) set solib-absolute-prefix /opt/montavista/mobilinux/devkit/arm/v5t_le/target
Reading symbols from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6...done.
Loaded symbols for /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6
Reading symbols from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/ld-linux.so.3...done.
Loaded symbols for /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/ld-linux.so.3
(gdb) s
Single stepping until exit from function fprintf,
which has no line number information.
0x400699c0 in printf () from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6
(gdb) s
Single stepping until exit from function printf,
which has no line number information.
main () at helloworld.cpp:11
11 Jump();
(gdb) s
Jump () at helloworld.cpp:21
21 printf("\nIt may work");
(gdb) s
22 printf("\n1");
(gdb) s
23 printf("\n1");
(gdb) s
24 printf("\n1");
(gdb) s
25 printf("\n1");
(gdb) s
26 printf("\n1");
(gdb) s
27 }
(gdb) s
main () at helloworld.cpp:12
12 printf("\nWow Amazing!!!");
(gdb) s
13 printf("\n1");
(gdb) s
14 printf("\n1");
(gdb) s
16 return 0;
(gdb) s
17 }
(gdb) s
0x4003c8ac in __libc_start_main () from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6
(gdb) s
Single stepping until exit from function __libc_start_main,
which has no line number information.
Program exited normally.
This error comes only in ARM because I was able to do intended on my system.
Is it a bug having some fix or is it yet to be fixed.
---------------------------------
Did you know? You can CHAT without downloading messenger. Know how!
--0-722748746-1181580271=:90003
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Hi,<br>I was trying to single step on a simple helloworld kind of program on a remote machine(arm target board) using gdb-gdbserver, having printf in it but as I single stepped printf it caused crash of gdb.<br>My gdb is a cross gdb compiled for arm.<br>Then I tried to run my cross gdb in my system gdb and got the following info about crash:<br><br><br><span style="font-weight: bold;">Code that was tested:</span><br>#include<stdio.h><br>//using namespace std;<br>void Jump();<br>int main()<br>{<br> <br>// cout<<"Hello World";<br>// cout<<"\nhere we go";<br> printf("\nUsing Printf");<br> Jump();<br> printf("\nWow Amazing!!!"); <br> printf("\n1");<br> printf("\n1");<br>// cout<<"\nWe r back";<br> return 0;<br>}<br>void Jump()<br>{<br>// cout<<"\nWe
jumped here";<br> printf("\nIt may work");<br> printf("\n1");<br> printf("\n1");<br> printf("\n1");<br> printf("\n1");<br> printf("\n1");<br>}<br><br><br><br><span style="font-weight: bold;">GDB Server output</span>:<br><br>-bash-2.05b# ./gdbserver 172.16.137.45:5436 a.out<br>Process a.out created; pid = 498<br>Listening on port 5436<br>Remote debugging from host 172.16.137.45<br>readchar: Got EOF<br>Remote side has terminated connection. GDBserver will reopen the connection.<br>Listening on port 5436<br><br>Remote debugging from host 172.16.137.45<br><br>Using Printf<br>It may work<br>1<br>1<br>1<br>1<br>1<br>Wow Amazing!!!<br>1<br>1<br>Child exited with retcode = 0<br><br>Child exited with status 0<br>GDBserver exiting<br><br><br>GDB Output:<br><br><br>host:~/gdb-6.3/gdb[69] (** NONE **)>gdb ./gdb<br>GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)<br>Copyright
2004 Free Software Foundation, Inc.<br>GDB is free software, covered by the GNU General Public License, and you are<br>welcome to change it and/or distribute copies of it under certain conditions.<br>Type "show copying" to see the conditions.<br>There is absolutely no warranty for GDB. Type "show warranty" for details.<br>This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db lib rary "/lib/tls/libthread_db.so.1".<br><br>Setting up the environment for debugging gdb.<br>Breakpoint 1 at 0x805559f:
file utils.c, line 849.<br>Breakpoint 2 at 0x807493a: file ./cli/cli-cmds.c, line 193.<br>(top-gdb) file ./gdb<br>Load new symbol table from "/auto_home/kandpal/gdb-6.3/gdb/gdb"? (y or n) y<br>Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/gdb...done.<br>(top-gdb) r<br>Starting program: /auto_home/kandpal/gdb-6.3/gdb/gdb<br>GNU gdb 6.3<br>Copyright 2004 Free Software Foundation, Inc.<br>GDB is free software, covered by the GNU General Public License, and you are<br>welcome to change it and/or distribute copies of it under certain conditions.<br>Type "show copying" to see the conditions.<br>There is absolutely no warranty for GDB. Type "show warranty" for details.<br>This GDB was configured as "--host=i686-pc-linux-gnu
--target=armv5tl-montavista -linuxeabi".<br>Setting up the environment for debugging gdb.<br>No symbol table is loaded. Use the "file" command.<br>No symbol table is loaded. Use the "file" command.<br>.gdbinit:8: Error in sourced command file:<br>No breakpoint number 0.<br>(gdb) set solib-absolute-prefix
/opt/montavista/mobilinux/devkit/arm/v5t_le/targ et<br>(gdb) file a.out<br>Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/a.out...done.<br>(gdb) target remote 172.16.136.119:5436<br>Remote debugging using 172.16.136.119:5436<br>0x40000790 in ?? ()<br>(gdb) br main<br>Breakpoint 1 at 0x8420: file helloworld.cpp, line 10.<br>(gdb) c<br>Continuing.<br><br>Breakpoint 1, main () at helloworld.cpp:10<br>10 printf("\nUsing Printf");<br>(gdb)
s<br><br>Program received signal SIGSEGV, Segmentation fault.<br>0x08059865 in get_frame_pc (frame=0x0) at frame.c:1244<br>1244 gdb_assert (frame->next != NULL);<br>(top-gdb) bt<br>#0 0x08059865 in get_frame_pc (frame=0x0) at frame.c:1244<br>During symbol reading, Incomplete CFI data; unspecified register eax at 0x08059891.<br>#1 0x080b9a9c in insert_step_resume_breakpoint_at_frame (return_frame=0x0)<br> at infrun.c:2670<br>#2 0x080bc7b8 in handle_inferior_event (ecs=0xbfe247e0) at infrun.c:2449<br>#3 0x080bcdbe in wait_for_inferior () at infrun.c:991<br>#4 0x080bcef1 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,<br> step=1) at infrun.c:814<br>#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)<br> at infcmd.c:688<br>#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733<br>#7
0x080c5a00 in command_handler (command=0x976f8e8 "s") at event-top.c:500<br>#8 0x080c5fde in command_line_handler (rl=0x97ceab0 "P�{\t")<br> at event-top.c:793<br>#9 0x0817c1fe in rl_callback_read_char () at callback.c:123<br>#10 0x080c53a7 in rl_callback_read_char_wrapper (client_data=0x0)<br> at event-top.c:166<br>#11 0x080c4cb0 in handle_file_event (event_file_desc=0) at event-loop.c:721<br>#12 0x080c47ca in process_event () at event-loop.c:334<br>#13 0x080c4f4d in gdb_do_one_event (data=0x0) at event-loop.c:371<br>#14 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,<br> func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,<br> func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at top.c:431<br>---Type <return> to continue, or q <return> to quit---<br>#15 0x080533da in
catch_errors (func=0x80c4e38 <gdb_do_one_event>,<br> func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536<br>#16 0x0807e31b in tui_command_loop (data=0x0) at ./tui/tui-interp.c:150<br>#17 0x080c29d7 in current_interp_command_loop () at interps.c:277<br>#18 0x0804b7a7 in captured_command_loop (data=0x0) at ./main.c:91<br>#19 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,<br> func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,<br> func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at top.c:431<br>#20 0x080533da in catch_errors (func=0x804b79c <captured_command_loop>,<br> func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536<br>#21 0x0804bea3 in captured_main (data=0xbfe24fc0) at ./main.c:801<br>#22 0x0805328a in catcher (func=0x8053390
<do_catch_errors>,<br> func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,<br> func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at top.c:431<br>#23 0x080533da in catch_errors (func=0x804b7d4 <captured_main>,<br> func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6) at top.c:536<br>#24 0x0804c55f in gdb_main (args=0xffffffff) at ./main.c:810<br>#25 0x0804b795 in main (argc=0, argv=0x0) at gdb.c:35<br>(top-gdb) frame 5<br>#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)<br> at infcmd.c:688<br>688 proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);<br>(top-gdb) info args<br>skip_subroutines = 0<br>single_inst = 0<br>count_string = 0x0<br>(top-gdb) l
top.c:733<br>728 else if (!cmd_func_p (c))<br>729 error ("That is not a command, just a help topic.");<br>730 else if (deprecated_call_command_hook)<br>731 deprecated_call_command_hook (c, arg, from_tty & caution);<br>732 else<br>733 cmd_func (c, arg, from_tty & caution);<br>734<br>735 /* If this command has been post-hooked, run the hook last. */<br>736 execute_cmd_post_hook (c);<br>737<br>(top-gdb) frame 6<br>#6 0x080536e4 in execute_command
(p=0x976f8e9 "", from_tty=1) at top.c:733<br>733 cmd_func (c, arg, from_tty & caution);<br>(top-gdb) l top.c:730<br>725 execute_user_command (c, arg);<br>726 else if (c->type == set_cmd || c->type == show_cmd)<br>727 do_setshow_command (arg, from_tty & caution, c);<br>728 else if (!cmd_func_p (c))<br>729 error ("That is not a command, just a help topic.");<br>730 else if (deprecated_call_command_hook)<br>731
deprecated_call_command_hook (c, arg, from_tty & caution);<br>732 else<br>733 cmd_func (c, arg, from_tty & caution);<br>734<br>(top-gdb) info args<br>p = 0x976f8e9 ""<br>from_tty = 1<br>(top-gdb) frame<br>#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733<br>733 cmd_func (c, arg, from_tty & caution);<br>(top-gdb) info frame<br>Stack level 6, frame at 0xbfe24930:<br> eip = 0x80536e4 in execute_command (top.c:733); saved eip 0x80c5a00<br> called by frame at 0xbfe24960, caller of frame at 0xbfe24900<br> source language c.<br> Arglist at 0xbfe24928, args: p=0x976f8e9 "", from_tty=1<br> Locals at 0xbfe24928, Previous frame's sp is 0xbfe24930<br> Saved registers:<br> ebx at 0xbfe2491c, ebp at
0xbfe24928, esi at 0xbfe24920, edi at 0xbfe24924,<br> eip at 0xbfe2492c<br>(top-gdb)<br>(top-gdb) frame 1<br>#1 0x080b9a9c in insert_step_resume_breakpoint_at_frame (return_frame=0x0)<br> at infrun.c:2670<br>2670 sr_sal.pc = ADDR_BITS_REMOVE (get_frame_pc (return_frame));<br>(top-gdb) info frame<br>Stack level 1, frame at 0xbfe246f0:<br> eip = 0x80b9a9c in insert_step_resume_breakpoint_at_frame (infrun.c:2670);<br> saved eip 0x80bc7b8<br> called by frame at 0xbfe247d0, caller of frame at 0xbfe24690<br> source language c.<br> Arglist at 0xbfe246e8, args: return_frame=0x0<br> Locals at 0xbfe246e8, Previous frame's sp is 0xbfe246f0<br> Saved registers:<br> ebx at 0xbfe246dc, ebp at 0xbfe246e8, esi at 0xbfe246e0, edi at 0xbfe246e4,<br> eip at 0xbfe246ec<br>(top-gdb) frame 2<br>#2 0x080bc7b8 in handle_inferior_event (ecs=0xbfe247e0) at
infrun.c:2449<br>2449 insert_step_resume_breakpoint_at_frame (get_prev_frame (get_current_frame ()));<br>(top-gdb) info frame<br>Stack level 2, frame at 0xbfe247d0:<br> eip = 0x80bc7b8 in handle_inferior_event (infrun.c:2449); saved eip 0x80bcdbe<br> called by frame at 0xbfe24890, caller of frame at 0xbfe246f0<br> source language c.<br> Arglist at 0xbfe247c8, args: ecs=0xbfe247e0<br> Locals at 0xbfe247c8, Previous frame's sp is 0xbfe247d0<br> Saved registers:<br> ebx at 0xbfe247bc, ebp at 0xbfe247c8, esi at 0xbfe247c0, edi at 0xbfe247c4,<br> eip at 0xbfe247cc<br>(top-gdb) frame 3<br>#3 0x080bcdbe in wait_for_inferior () at infrun.c:991<br>991 handle_inferior_event (ecs);<br>(top-gdb) info frame<br>Stack level 3, frame at 0xbfe24890:<br> eip = 0x80bcdbe in wait_for_inferior
(infrun.c:991); saved eip 0x80bcef1<br> called by frame at 0xbfe248d0, caller of frame at 0xbfe247d0<br> source language c.<br> Arglist at 0xbfe24888, args:<br> Locals at 0xbfe24888, Previous frame's sp is 0xbfe24890<br> Saved registers:<br> ebx at 0xbfe2487c, ebp at 0xbfe24888, esi at 0xbfe24880, edi at 0xbfe24884,<br> eip at 0xbfe2488c<br>(top-gdb) frame 4<br>#4 0x080bcef1 in proceed (addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,<br> step=1) at infrun.c:814<br>814 wait_for_inferior ();<br>(top-gdb) info frame<br>Stack level 4, frame at 0xbfe248d0:<br> eip = 0x80bcef1 in proceed (infrun.c:814); saved eip 0x80b7692<br> called by frame at 0xbfe24900, caller of frame at 0xbfe24890<br> source language c.<br> Arglist at 0xbfe248c8, args: addr=4294967295, siggnal=TARGET_SIGNAL_DEFAULT,<br> step=1<br> Locals at
0xbfe248c8, Previous frame's sp is 0xbfe248d0<br> Saved registers:<br> ebx at 0xbfe248bc, ebp at 0xbfe248c8, esi at 0xbfe248c0, edi at 0xbfe248c4,<br> eip at 0xbfe248cc<br>(top-gdb) frame 5<br>#5 0x080b7692 in step_1 (skip_subroutines=0, single_inst=0, count_string=0x0)<br> at infcmd.c:688<br>688 proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);<br>(top-gdb) info frame<br>Stack level 5, frame at 0xbfe24900:<br> eip = 0x80b7692 in step_1 (infcmd.c:688); saved eip 0x80536e4<br> called by frame at 0xbfe24930, caller of frame at 0xbfe248d0<br> source language c.<br> Arglist at 0xbfe248f8, args: skip_subroutines=0, single_inst=0,<br> count_string=0x0<br> Locals at 0xbfe248f8, Previous frame's sp is 0xbfe24900<br> Saved registers:<br> ebx at 0xbfe248ec, ebp at 0xbfe248f8, esi at 0xbfe248f0, edi at
0xbfe248f4,<br> eip at 0xbfe248fc<br>(top-gdb) frame 6<br>#6 0x080536e4 in execute_command (p=0x976f8e9 "", from_tty=1) at top.c:733<br>733 cmd_func (c, arg, from_tty & caution);<br>(top-gdb) info frame<br>Stack level 6, frame at 0xbfe24930:<br> eip = 0x80536e4 in execute_command (top.c:733); saved eip 0x80c5a00<br> called by frame at 0xbfe24960, caller of frame at 0xbfe24900<br> source language c.<br> Arglist at 0xbfe24928, args: p=0x976f8e9 "", from_tty=1<br> Locals at 0xbfe24928, Previous frame's sp is 0xbfe24930<br> Saved registers:<br> ebx at 0xbfe2491c, ebp at 0xbfe24928, esi at 0xbfe24920, edi at 0xbfe24924,<br> eip at 0xbfe2492c<br>(top-gdb) frame 7<br>#7 0x080c5a00 in command_handler (command=0x976f8e8 "s") at event-top.c:500<br>500 execute_command (command, instream == stdin);<br>(top-gdb) info
frame<br>Stack level 7, frame at 0xbfe24960:<br> eip = 0x80c5a00 in command_handler (event-top.c:500); saved eip 0x80c5fde<br> called by frame at 0xbfe24990, caller of frame at 0xbfe24930<br> source language c.<br> Arglist at 0xbfe24958, args: command=0x976f8e8 "s"<br> Locals at 0xbfe24958, Previous frame's sp is 0xbfe24960<br> Saved registers:<br> ebx at 0xbfe2494c, ebp at 0xbfe24958, esi at 0xbfe24950, edi at 0xbfe24954,<br> eip at 0xbfe2495c<br>(top-gdb) frame 8<br>#8 0x080c5fde in command_line_handler (rl=0x97ceab0 "P�{\t")<br> at event-top.c:793<br>793 command_handler (line);<br>(top-gdb) info frame<br>Stack level 8, frame at 0xbfe24990:<br> eip = 0x80c5fde in command_line_handler (event-top.c:793); saved eip 0x817c1fe<br> called by frame at 0xbfe249b0, caller of frame at 0xbfe24960<br> source language
c.<br> Arglist at 0xbfe24988, args: rl=0x97ceab0 "P�{\t"<br> Locals at 0xbfe24988, Previous frame's sp is 0xbfe24990<br> Saved registers:<br> ebx at 0xbfe2497c, ebp at 0xbfe24988, esi at 0xbfe24980, edi at 0xbfe24984,<br> eip at 0xbfe2498c<br>(top-gdb) frame 9<br>#9 0x0817c1fe in rl_callback_read_char () at callback.c:123<br>123 (*rl_linefunc) (line);<br>(top-gdb) info frame<br>Stack level 9, frame at 0xbfe249b0:<br> eip = 0x817c1fe in rl_callback_read_char (callback.c:123); saved eip 0x80c53a7<br> called by frame at 0xbfe249c0, caller of frame at 0xbfe24990<br> source language c.<br> Arglist at 0xbfe249a8, args:<br> Locals at 0xbfe249a8, Previous frame's sp is 0xbfe249b0<br> Saved registers:<br> ebx at 0xbfe249a4, ebp at 0xbfe249a8, esi at 0xbfe24980, edi at 0xbfe24984,<br> eip at 0xbfe249ac<br>(top-gdb) frame
10<br>#10 0x080c53a7 in rl_callback_read_char_wrapper (client_data=0x0)<br> at event-top.c:166<br>166 rl_callback_read_char ();<br>(top-gdb) info frame<br>Stack level 10, frame at 0xbfe249c0:<br> eip = 0x80c53a7 in rl_callback_read_char_wrapper (event-top.c:166);<br> saved eip 0x80c4cb0<br> called by frame at 0xbfe249e0, caller of frame at 0xbfe249b0<br> source language c.<br> Arglist at 0xbfe249b8, args: client_data=0x0<br> Locals at 0xbfe249b8, Previous frame's sp is 0xbfe249c0<br> Saved registers:<br> ebx at 0xbfe249a4, ebp at 0xbfe249b8, esi at 0xbfe24980, edi at 0xbfe24984,<br> eip at 0xbfe249bc<br>(top-gdb) frame 11<br>#11 0x080c4cb0 in handle_file_event (event_file_desc=0) at event-loop.c:721<br>721 (*file_ptr->proc) (file_ptr->error,
file_ptr->client_data);<br>(top-gdb) info frame<br>Stack level 11, frame at 0xbfe249e0:<br> eip = 0x80c4cb0 in handle_file_event (event-loop.c:721); saved eip 0x80c47ca<br> called by frame at 0xbfe24a00, caller of frame at 0xbfe249c0<br> source language c.<br> Arglist at 0xbfe249d8, args: event_file_desc=0<br> Locals at 0xbfe249d8, Previous frame's sp is 0xbfe249e0<br> Saved registers:<br> ebx at 0xbfe249d0, ebp at 0xbfe249d8, esi at 0xbfe249d4, edi at 0xbfe24984,<br> eip at 0xbfe249dc<br>(top-gdb) frame 12<br>#12 0x080c47ca in process_event () at event-loop.c:334<br>334 (*proc) (fd);<br>(top-gdb) info frame<br>Stack level 12, frame at 0xbfe24a00:<br> eip = 0x80c47ca in process_event (event-loop.c:334); saved eip 0x80c4f4d<br> called by frame at 0xbfe24a30, caller of frame at 0xbfe249e0<br> source language c.<br> Arglist at 0xbfe249f8,
args:<br> Locals at 0xbfe249f8, Previous frame's sp is 0xbfe24a00<br> Saved registers:<br> ebx at 0xbfe249f0, ebp at 0xbfe249f8, esi at 0xbfe249f4, edi at 0xbfe24984,<br> eip at 0xbfe249fc<br>(top-gdb) frame 13<br>#13 0x080c4f4d in gdb_do_one_event (data=0x0) at event-loop.c:371<br>371 if (process_event ())<br>(top-gdb) info frame<br>Stack level 13, frame at 0xbfe24a30:<br> eip = 0x80c4f4d in gdb_do_one_event (event-loop.c:371); saved eip 0x805328a<br> called by frame at 0xbfe24b10, caller of frame at 0xbfe24a00<br> source language c.<br> Arglist at 0xbfe24a28, args: data=0x0<br> Locals at 0xbfe24a28, Previous frame's sp is 0xbfe24a30<br> Saved registers:<br> ebx at 0xbfe24a1c, ebp at 0xbfe24a28, esi at 0xbfe24a20, edi at 0xbfe24a24,<br> eip at 0xbfe24a2c<br>(top-gdb) frame 14<br>#14 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,<br>
func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,<br> func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at top.c:431<br>431 val = (*func) (func_uiout, func_args);<br>(top-gdb) info frame<br>Stack level 14, frame at 0xbfe24b10:<br> eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da<br> called by frame at 0xbfe24b50, caller of frame at 0xbfe24a30<br> source language c.<br> Arglist at 0xbfe24b08, args: func=0x8053390 <do_catch_errors>,<br> func_uiout=0x97a2fa0, func_args=0xbfe24b40, func_val=0xbfe24b38,<br> func_caught=0xbfe24b3c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>(top-gdb) frame 15<br>#15 0x080533da in catch_errors (func=0x80c4e38 <gdb_do_one_event>,<br> func_args=0x0,
errstring=0x8196819 "", mask=6) at top.c:536<br>536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,<br>(top-gdb) info frame<br>Stack level 15, frame at 0xbfe24b50:<br> eip = 0x80533da in catch_errors (top.c:536); saved eip 0x807e31b<br> called by frame at 0xbfe24b90, caller of frame at 0xbfe24b10<br> source language c.<br> Arglist at 0xbfe24b48, args: func=0x80c4e38 <gdb_do_one_event>,<br> func_args=0x0, errstring=0x8196819 "", mask=6<br> Locals at 0xbfe24b48, Previous frame's sp is 0xbfe24b50<br> Saved registers:<br> ebx at 0xbfe24b00, ebp at 0xbfe24b48, esi at 0xbfe24b04, edi at 0xbfe24a24,<br> eip at 0xbfe24b4c<br>(top-gdb) frame 16<br>#16 0x0807e31b in tui_command_loop (data=0x0) at ./tui/tui-interp.c:150<br>150 int result = catch_errors (gdb_do_one_event, 0, "",
RETURN_MASK_ALL);<br>(top-gdb) info frame<br>Stack level 16, frame at 0xbfe24b90:<br> eip = 0x807e31b in tui_command_loop (./tui/tui-interp.c:150);<br> saved eip 0x80c29d7<br> called by frame at 0xbfe24bb0, caller of frame at 0xbfe24b50<br> source language c.<br> Arglist at 0xbfe24b88, args: data=0x0<br> Locals at 0xbfe24b88, Previous frame's sp is 0xbfe24b90<br> Saved registers:<br> ebx at 0xbfe24b7c, ebp at 0xbfe24b88, esi at 0xbfe24b80, edi at 0xbfe24b84,<br> eip at 0xbfe24b8c<br>(top-gdb) frame 17<br>#17 0x080c29d7 in current_interp_command_loop () at interps.c:277<br>277 current_interpreter->procs->command_loop_proc (current_interpreter->data);<br>(top-gdb) info frame<br>Stack level 17, frame at 0xbfe24bb0:<br> eip = 0x80c29d7 in current_interp_command_loop (interps.c:277);<br> saved eip 0x804b7a7<br> called by frame at
0xbfe24bc0, caller of frame at 0xbfe24b90<br> source language c.<br> Arglist at 0xbfe24ba8, args:<br> Locals at 0xbfe24ba8, Previous frame's sp is 0xbfe24bb0<br> Saved registers:<br> ebx at 0xbfe24b7c, ebp at 0xbfe24ba8, esi at 0xbfe24b80, edi at 0xbfe24b84,<br> eip at 0xbfe24bac<br>(top-gdb) frame 18<br>#18 0x0804b7a7 in captured_command_loop (data=0x0) at ./main.c:91<br>91 current_interp_command_loop ();<br>(top-gdb) info frame<br>Stack level 18, frame at 0xbfe24bc0:<br> eip = 0x804b7a7 in captured_command_loop (./main.c:91); saved eip 0x805328a<br> called by frame at 0xbfe24ca0, caller of frame at 0xbfe24bb0<br> source language c.<br> Arglist at 0xbfe24bb8, args: data=0x0<br> Locals at 0xbfe24bb8, Previous frame's sp is 0xbfe24bc0<br> Saved registers:<br> ebx at 0xbfe24b7c, ebp at 0xbfe24bb8, esi at 0xbfe24b80, edi at 0xbfe24b84,<br> eip at
0xbfe24bbc<br>(top-gdb) frame 19<br>#19 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,<br> func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,<br> func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at top.c:431<br>431 val = (*func) (func_uiout, func_args);<br>(top-gdb) info frame<br>Stack level 19, frame at 0xbfe24ca0:<br> eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da<br> called by frame at 0xbfe24ce0, caller of frame at 0xbfe24bc0<br> source language c.<br> Arglist at 0xbfe24c98, args: func=0x8053390 <do_catch_errors>,<br> func_uiout=0x97a2fa0, func_args=0xbfe24cd0, func_val=0xbfe24cc8,<br> func_caught=0xbfe24ccc, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>(top-gdb) frame
20<br>#20 0x080533da in catch_errors (func=0x804b79c <captured_command_loop>,<br> func_args=0x0, errstring=0x8196819 "", mask=6) at top.c:536<br>536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,<br>(top-gdb) info frame<br>Stack level 20, frame at 0xbfe24ce0:<br> eip = 0x80533da in catch_errors (top.c:536); saved eip 0x804bea3<br> called by frame at 0xbfe24e60, caller of frame at 0xbfe24ca0<br> source language c.<br> Arglist at 0xbfe24cd8, args: func=0x804b79c <captured_command_loop>,<br> func_args=0x0, errstring=0x8196819 "", mask=6<br> Locals at 0xbfe24cd8, Previous frame's sp is 0xbfe24ce0<br> Saved registers:<br> ebx at 0xbfe24c90, ebp at 0xbfe24cd8, esi at 0xbfe24c94, edi at 0xbfe24b84,<br> eip at 0xbfe24cdc<br>#21 0x0804bea3 in captured_main (data=0xbfe24fc0) at
./main.c:801<br>801 catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL);<br>(top-gdb) info frame<br>Stack level 21, frame at 0xbfe24e60:<br> eip = 0x804bea3 in captured_main (./main.c:801); saved eip 0x805328a<br> called by frame at 0xbfe24f40, caller of frame at 0xbfe24ce0<br> source language c.<br> Arglist at 0xbfe24e58, args: data=0xbfe24fc0<br> Locals at 0xbfe24e58, Previous frame's sp is 0xbfe24e60<br> Saved registers:<br> ebx at 0xbfe24e4c, ebp at 0xbfe24e58, esi at 0xbfe24e50, edi at 0xbfe24e54,<br> eip at 0xbfe24e5c<br>(top-gdb) frame 22<br>#22 0x0805328a in catcher (func=0x8053390 <do_catch_errors>,<br> func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,<br> func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>)<br> at
top.c:431<br>431 val = (*func) (func_uiout, func_args);<br>(top-gdb) info frame<br>Stack level 22, frame at 0xbfe24f40:<br> eip = 0x805328a in catcher (top.c:431); saved eip 0x80533da<br> called by frame at 0xbfe24f80, caller of frame at 0xbfe24e60<br> source language c.<br> Arglist at 0xbfe24f38, args: func=0x8053390 <do_catch_errors>,<br> func_uiout=0x8200be0, func_args=0xbfe24f70, func_val=0xbfe24f68,<br> func_caught=0xbfe24f6c, errstring=0x8196819 "", gdberrmsg=0x0, mask=Variable "mask" is not available.<br>(top-gdb) frame 23<br>#23 0x080533da in catch_errors (func=0x804b7d4 <captured_main>,<br> func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6) at top.c:536<br>536 catcher (do_catch_errors, uiout, &args, &val, &caught, errstring,<br>(top-gdb) info frame<br>Stack level 23, frame at
0xbfe24f80:<br> eip = 0x80533da in catch_errors (top.c:536); saved eip 0x804c55f<br> called by frame at 0xbfe24fa0, caller of frame at 0xbfe24f40<br> source language c.<br> Arglist at 0xbfe24f78, args: func=0x804b7d4 <captured_main>,<br> func_args=0xbfe24fc0, errstring=0x8196819 "", mask=6<br> Locals at 0xbfe24f78, Previous frame's sp is 0xbfe24f80<br> Saved registers:<br> ebx at 0xbfe24f30, ebp at 0xbfe24f78, esi at 0xbfe24f34, edi at 0xbfe24e54,<br> eip at 0xbfe24f7c<br>(top-gdb) frame 24<br>#24 0x0804c55f in gdb_main (args=0xffffffff) at ./main.c:810<br>810 catch_errors (captured_main, args, "", RETURN_MASK_ALL);<br>(top-gdb) info frame<br>Stack level 24, frame at 0xbfe24fa0:<br> eip = 0x804c55f in gdb_main (./main.c:810); saved eip 0x804b795<br> called by frame at 0xbfe24fe0, caller of frame at 0xbfe24f80<br> source language c.<br> Arglist at
0xbfe24f98, args: args=0xffffffff<br> Locals at 0xbfe24f98, Previous frame's sp is 0xbfe24fa0<br> Saved registers:<br> ebx at 0xbfe24f30, ebp at 0xbfe24f98, esi at 0xbfe24f34, edi at 0xbfe24e54,<br> eip at 0xbfe24f9c<br>(top-gdb) frame 25<br>#25 0x0804b795 in main (argc=0, argv=0x0) at gdb.c:35<br>35 return gdb_main (&args);<br>(top-gdb) info frame<br>Stack level 25, frame at 0xbfe24fe0:<br> eip = 0x804b795 in main (gdb.c:35); saved eip 0x17bde3<br> caller of frame at 0xbfe24fa0<br> source language c.<br> Arglist at 0xbfe24fd8, args: argc=0, argv=0x0<br> Locals at 0xbfe24fd8, Previous frame's sp is 0xbfe24fe0<br> Saved registers:<br> ebx at 0xbfe24f30, ebp at 0xbfe24fd8, esi at 0xbfe24f34, edi at 0xbfe24fd4,<br> eip at 0xbfe24fdc<br><br><br><span style="font-weight: bold;">Running again will result in sucess:</span><br><br>(top-gdb) file ./gdb<br>Load new symbol
table from "/auto_home/kandpal/gdb-6.3/gdb/gdb"? (y or n) y<br>Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/gdb...done.<br>(top-gdb) r<br>Starting program: /auto_home/kandpal/gdb-6.3/gdb/gdb<br>Warning - cannot source /icl-tools/common/common_cshrc<br>/icl-tools/bin/query_proj.pl: Command not found.<br>GNU gdb 6.3<br>Copyright 2004 Free Software Foundation, Inc.<br>GDB is free software, covered by the GNU General Public License, and you are<br>welcome to change it and/or distribute copies of it under certain conditions.<br>Type "show copying" to see the conditions.<br>There is absolutely no warranty for GDB. Type "show warranty" for details.<br>This GDB was configured as "--host=i686-pc-linux-gnu --target=armv5tl-montavista-linuxeabi".<br>Setting up the environment for debugging gdb.<br>No symbol table is loaded. Use the "file" command.<br>No symbol table is loaded. Use the "file" command.<br>.gdbinit:8: Error in sourced command file:<br>No
breakpoint number 0.<br>(gdb) file a.out<br>Reading symbols from /auto_home/kandpal/gdb-6.3/gdb/a.out...done.<br>(gdb) target remote 172.16.136.119:5436<br>Remote debugging using 172.16.136.119:5436<br>0x400699a0 in ?? ()<br>warning: Unable to find dynamic linker breakpoint function.<br>GDB will be unable to debug shared library initializers<br>and track explicitly loaded dynamic code.<br>(gdb) set solib-absolute-prefix /opt/montavista/mobilinux/devkit/arm/v5t_le/target<br>Reading symbols from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6...done.<br>Loaded symbols for /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6<br>Reading symbols from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/ld-linux.so.3...done.<br>Loaded symbols for /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/ld-linux.so.3<br>(gdb) s<br>Single stepping until exit from function fprintf,<br>which has no line number information.<br>0x400699c0 in printf () from
/opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6<br>(gdb) s<br>Single stepping until exit from function printf,<br>which has no line number information.<br>main () at helloworld.cpp:11<br>11 Jump();<br>(gdb) s<br>Jump () at helloworld.cpp:21<br>21 printf("\nIt may work");<br>(gdb) s<br>22 printf("\n1");<br>(gdb) s<br>23 printf("\n1");<br>(gdb) s<br>24 printf("\n1");<br>(gdb) s<br>25 printf("\n1");<br>(gdb) s<br>26
printf("\n1");<br>(gdb) s<br>27 }<br>(gdb) s<br>main () at helloworld.cpp:12<br>12 printf("\nWow Amazing!!!");<br>(gdb) s<br>13 printf("\n1");<br>(gdb) s<br>14 printf("\n1");<br>(gdb) s<br>16 return 0;<br>(gdb) s<br>17 }<br>(gdb) s<br>0x4003c8ac in __libc_start_main () from /opt/montavista/mobilinux/devkit/arm/v5t_le/target/lib/libc.so.6<br>(gdb) s<br>Single stepping until exit from function __libc_start_main,<br>which has no line number information.<br><br>Program exited normally.<br><br>This error comes only in ARM because I was able to do intended on my system.<br><br>Is it a bug having some fix or is it
yet to be fixed.<br><br><br><p> 
<hr size=1></hr> Did you know? You can CHAT without downloading messenger. <a href="http://us.rd.yahoo.com/mail/in/ywebmessenger1/*http://in.messenger.yahoo.com/webmessengerpromo.php"> Know how!</a>
--0-722748746-1181580271=:90003--
Technical Details
Message-ID:
<mailman.1948.1181580288.32220.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,e30a00aa7304eb09,start X-Google-Attributes: gidf5053,public,usenet X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: Tribhuwan Kandpal <tri_bhu@yahoo.co.in> Newsgroups: gnu.gdb.bug Subject: GDB crashes while single stepping in ARM Date: Mon, 11 Jun 2007 17:44:31 +0100 (BST) Lines: 700 Approved: bug-gdb@gnu.org Message-ID: <mailman.1948.1181580288.32220.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-722748746-1181580271=:90003" Content-Transfer-Encoding: 8bit X-Trace: news.Stanford.EDU 1181580290 19292 199.232.76.165 (11 Jun 2007 16:44:50 GMT) X-Complaints-To: news@news.stanford.edu To: bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=GAUI8F6em/h36IypW2QG8AjnlUwxOJkVkZwCjk0TPI0b5Syl58gky7PJAQmarIzhS7GifTf8eonjeX4m+EQj6soYY8lviFeoRn05V05ketsi47V+0g6Q+hn8DtY8dbJiGzaQLYXbibPIfDNBRodjpxgO76QR2seMF7HmsgvEBew=; X-YMail-OSG: 2mJhyVwVM1mQJn5xmWtwD___5CMFe3qkAxqn.fpazpPaPUtjNggziLWsl_O5C0eQ8rgGKMHwNKF6AF1m4.iNF55KrwU_IGe.NoSUqxHQHxhyXe4yG_UeOOmy4Fyw5_jQQTdZYmRLeQHSR44oPdXJLES6_fmKf9pQtW.Aytfh9BxTfi_sO6Jurio- X-detected-kernel: Genre and OS details not recognized. X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>