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/278: error in step mode execution of programs in gdb



>Number:         278
>Category:       gdb
>Synopsis:       error in step mode execution of programs in gdb
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 19 05:08:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     sirish@deeproot.co.in
>Release:        GDB 20010813
>Organization:
>Environment:
Linux 2.4.8-26mdk.
uniprocessor
>Description:
The attached program has a error. The function strtok should not be executed on a const string. Thus  a segmentation fault occurs. 
	but in gdb when running the program in step mode, segmentation fault does not occur. Again, if the same program is run in gdb without breakpoints, segmentation fault occurs.
>How-To-Repeat:
compile with cc -g -o a a.c
run "gdb a"
execute in step mode
	break 4
	step
	step etc...
no segmentation fault occurs even though it should

next remove breakpoints and give run command in gdb
now segmentation fault occurs
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="a.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="a.c"

I2luY2x1ZGU8c3RyaW5nLmg+Cm1haW4oKQp7CmNoYXIgKmg9ImhlbGxvOmhhaTphOmI6YzpkIjsK
Y2hhciAqdG1wOwp0bXA9c3RydG9rKGgsIjoiKTsKcHJpbnRmKCIlcyBpcyAlZCBjaGFyc1xuIix0
bXAsc3RybGVuKGgpKTsKd2hpbGUodG1wPXN0cnRvayhOVUxMLCI6IikpCnsKcHJpbnRmKCIlcyBp
cyAlZCBjaGFyc1xuIix0bXAsc3RybGVuKHRtcCkpOwp9Cn0K


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