This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1881: Segmentation Fault in check_typedef


>Number:         1881
>Category:       gdb
>Synopsis:       Segmentation Fault in check_typedef
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 25 19:28:01 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Brito
>Release:        gdb 6.3
>Organization:
>Environment:
GNU gdb 6.3-debian
>Description:
Ok ok ... I submited another bugreport yesterday because I am in some gdb scripting voodoo.
This time, i called an internal function of my ~/.gdbinit, this function is good-working.
I was in need to test it again in another condition, so I did 'run' again (type 'y' to kill and start it again), it reached my breakpoint, i called my user-define function that i just called at last program-debuging... and this time I got a nice segfault.
I can't send you the source file of the program I am debuging nor my ~/.gdbinit, but I did a bit of debug on the gdb corefile and I hope these informations are enough for you to track it.
Good luck.

Segmentation fault (core dumped)
linux tmp $ gdb --core=core
GNU gdb 6.3-debian
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-linux".
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
Core was generated by `gdb ./l'.
Program terminated with signal 11, Segmentation fault.
#0  0x0811c9b4 in ?? ()
gdb> file /usr/bin/gdb
Reading symbols from /usr/bin/gdb...(no debugging symbols found)...done.
gdb> where
#0  0x0811c9b4 in check_typedef ()
#1  0x080dd1e2 in allocate_value ()
#2  0x080dd427 in value_copy ()
#3  0x080dd8ca in value_of_internalvar ()
#4  0x080e0d20 in evaluate_subexp_standard ()
#5  0x080deb59 in _initialize_values ()
#6  0x080e013e in evaluate_subexp_standard ()
#7  0x080deb59 in _initialize_values ()
#8  0x080ded7d in evaluate_expression ()
#9  0x080ed947 in output_command ()
#10 0x080afaf9 in _initialize_cli_dump ()
#11 0x080b1b4c in cmd_func ()
#12 0x0807dd7d in execute_command ()
#13 0x080b2099 in execute_control_command ()
#14 0x080b2218 in execute_control_command ()
#15 0x080b1fb8 in execute_user_command ()
#16 0x0807dd9c in execute_command ()
#17 0x0810f9bf in async_disable_stdin ()
#18 0x0810fe05 in async_disable_stdin ()
#19 0x23775151 in ?? ()
#20 0x08306058 in ?? ()
#21 0x00000003 in ?? ()
#22 0x00000010 in ?? ()
#23 0x2391a620 in ?? ()
#24 0x23919c60 in ?? ()
#25 0x2391a620 in ?? ()
#26 0x2385ba94 in ?? ()
#27 0x082d7980 in ?? ()
#28 0x00000001 in ?? ()
#29 0x081ffd9e in default_frame_base ()
#30 0x5a500dc8 in ?? ()
#31 0x0810f30b in delete_timer ()
#32 0x0810f30b in delete_timer ()
#33 0x0810f8ba in stdin_event_handler ()
#34 0x0810eb9e in delete_file_handler ()
#35 0x0810e659 in standard_macro_lookup ()
---Type <return> to continue, or q <return> to quit---
#36 0x0810e6b8 in gdb_do_one_event ()
#37 0x0807d9a1 in catch_exceptions_with_msg ()
#38 0x0807d820 in throw_exception ()
#39 0x0807da00 in catch_errors ()
#40 0x080be4e4 in _initialize_tui_hooks ()
#41 0x0810c3c3 in current_interp_command_loop ()
#42 0x080747cb in main ()
gdb> x/10i $eip
0x811c9b4 <check_typedef+20>:   cmpb   $0x15,(%eax)
0x811c9b7 <check_typedef+23>:   je     0x811cb61 <check_typedef+449>
0x811c9bd <check_typedef+29>:   mov    0xc(%ecx),%eax
0x811c9c0 <check_typedef+32>:   mov    0x14(%ecx),%edx
0x811c9c3 <check_typedef+35>:   mov    %eax,%esi
0x811c9c5 <check_typedef+37>:   mov    %eax,%ebx
0x811c9c7 <check_typedef+39>:   and    $0x20,%esi
0x811c9ca <check_typedef+42>:   and    $0x40,%ebx
0x811c9cd <check_typedef+45>:   movzbl (%edx),%eax
0x811c9d0 <check_typedef+48>:   sub    $0x3,%al
gdb> p/x $eax
$1 = 0x57535f32
gdb> p/c 0x57
$2 = 87 'W'
gdb> p/c 0x53
$3 = 83 'S'
gdb> p/c 0x5f
$4 = 95 '_'
gdb> p/c 0x32
$5 = 50 '2'
gdb> x/42x $esp
0x5a5005b0:     0x08386a60      0x23919c60      0x00000010      0x2391a620
0x5a5005c0:     0x23919c60      0x2391a620      0x083f2b44      0x083f2b44
0x5a5005d0:     0x083bf9c8      0x0000002f      0x5a5005e8      0x080dd1e2
0x5a5005e0:     0x083f2b44      0x00000001      0x5a500608      0x080dd427
0x5a5005f0:     0x083f2b44      0x0827b5c8      0x5a500608      0x00000001
0x5a500600:     0x08356170      0x0000002f      0x5a500628      0x080dd8ca
0x5a500610:     0x083bf9c8      0x2391a620      0x08211a67      0x103fedfc
0x5a500620:     0x00000001      0x5a500bc4      0x5a5008c8      0x080e0d20
0x5a500630:     0x08356170      0x0000000c      0x00000058      0x2391a620
0x5a500640:     0x23919c60      0x2391a620      0x00000001      0x5a500668
0x5a500650:     0x2385a8c3      0x2391a620
gdb> info r
eax            0x57535f32       1465081650
ecx            0x83f2b44        138357572
edx            0x83f2b44        138357572
ebx            0x83f2b44        138357572
esp            0x5a5005b0       0x5a5005b0
ebp            0x5a5005d8       0x5a5005d8
esi            0x83bf9c8        138148296
edi            0x2f     47
eip            0x811c9b4        0x811c9b4
eflags         0x10202  66050
cs             0x73     115
ss             0x7b     123
ds             0xc01f007b       -1071710085
es             0x7b     123
fs             0x0      0
gs             0x33     51
gdb> 
>How-To-Repeat:
I have no idee (well, sometime, but actually not)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]