[Top][All Lists]

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

gdb bug report

From: Gary Spezia
Subject: gdb bug report
Date: Fri, 29 Jul 2005 13:53:47 -0400


The version of GDB: 
GNU gdb 5.3

The type of machine you are using, and the operating system name and version 
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 
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 
    "unbound more=0 myoptind=2 optind=2 acount=0 arg=xxx"
4. examine external variable optind with gdb command "p optind". It produces:
    "$1 = 1"
The value of optind is actually 2.

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


Attachment: gt.c
Description: gt.c

reply via email to

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