🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Gary Spezia Fri, 29 Jul 2005 17:53
gdb bug report
#1187
Author: Gary Spezia
Date: Fri, 29 Jul 2005 17:53
85 lines
5153 bytes
This is a multi-part message in MIME format.

------_=_NextPart_001_01C59466.78749D78
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello:

The version of GDB:=20
GNU gdb 5.3

The type of machine you are using, and the operating system name and =
version number:
IBM xSeries 346, SuSE Linux Enterprise Server version 8 service pack 3

What compiler (and its version) was used to compile GDB:
Don't know, did not recompile GDB

What compiler (and its version) was used to compile the program you are =
debugging:
gcc (GCC) 3.2.2

The command arguments you gave the compiler to compile your example and =
observe the bug:
cc -g -o gt gt.c

A complete input script, and all necessary source files:
input script below, source file gt.c attached.

A description of what behavior you observe that you believe is =
incorrect:
1. run gdb with "gdb gt"
2. set breakpoint with "b 48" (source line is "acount++;")
3. run target program with "r xxx". Program produces output just before =
breakpoint:
    "unbound more=3D0 myoptind=3D2 optind=3D2 acount=3D0 arg=3Dxxx"
4. examine external variable optind with gdb command "p optind". It =
produces:
    "$1 =3D 1"
The value of optind is actually 2.

Regards,
Gary Spezia
Smarteye Corporation
2637 Bond Street
Rochester Hills, MI 48309

 <<gt.c>>=20

------_=_NextPart_001_01C59466.78749D78
Content-Type: application/octet-stream;
	name="gt.c"
Content-Transfer-Encoding: base64
Content-Description: gt.c
Content-Disposition: attachment;
	filename="gt.c"

LyogZ3Q6IGdldG9wdCgpIHRlc3QgcHJvZ3JhbSAqLw0KI2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5j
bHVkZSA8dW5pc3RkLmg+DQoNCmludCBteW9wdGluZDsNCg0KaW50CQkvKiBUUlVFOiBtb3JlX29w
dHM7IEZBTFNFOiBsYXN0X29uZSAqLw0KYXJnTkVYVCAoDQogIGludAlhcmdjLAkvKiBybwljb3Vu
dCBvZiBhcmd1bWVudHMgKi8NC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ICAgICBtb3JlID0gYXJnTkVYVChhcmdj
LCBhcmd2LCAiYWI6YyIsICZvcHQsICZhcmcpOw0KICAgICAgaWYob3B0ID09IDAgJiYgYXJnICE9
IE5VTEwpIHsNCglwcmludGYoICJ1bmJvdW5kIG1vcmU9JWQgbXlvcHRpbmQ9JWQgb3B0aW5kPSVk
IGFjb3VudD0lZCBhcmc9JXNcbiIsIG1vcmUsIG15b3B0aW5kLCBvcHRpbmQsIGFjb3VudCwgYXJn
ICk7DQoJYWNvdW50Kys7DQogICAgICB9DQogICAgICBlbHNlIHsNCglwcmludGYoICJvcHRpb24g
bW9yZT0lZCBteW9wdGluZD0lZCBvcHRpbmQ9JWQgb3B0PSVjIGFyZz0lc1xuIiwgbW9yZSwgbXlv
cHRpbmQsIG9wdGluZCwgb3B0LCBhcmcgKTsNCiAgICAgIH0NCiAgICB9IHdoaWxlKG1vcmUpOw0K
ICB9DQp9IC8qIG1haW4gKi8NCg==

------_=_NextPart_001_01C59466.78749D78--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads