bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB crashes while single stepping in ARM


From: Tribhuwan Kandpal
Subject: GDB crashes while single stepping in ARM
Date: Mon, 11 Jun 2007 17:44:31 +0100 (BST)

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="" 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="" at ./tui/tui-interp.c:150
#17 0x080c29d7 in current_interp_command_loop () at interps.c:277
#18 0x0804b7a7 in captured_command_loop (data="" 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="" 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="" 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=""> 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="" 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=""> 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="" 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=""> 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="" 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=""> 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!
reply via email to

[Prev in Thread] Current Thread [Next in Thread]