Article View: gnu.gdb.bug
Article #1129GDB all VERSION
From: sfddfsd
Date: Fri, 01 Feb 2013 22:04
Date: Fri, 01 Feb 2013 22:04
41 lines
3154 bytes
3154 bytes
hi, I write for the tool gdb, this has a bug.
you should compile this code with gcc proof.c -o proof .
#include <stdio.h>
int main(int argc,char** argv)
{
if( argc == 2 )
{
printf("%s",argv[1]);
}
return 0;
}
the next step is run gdb -q proof and put a breakpoint in function printf.
the direction of prinf is
0x0804843e <+34>: call 0x8048300 <printf@plt>
and put break in 0x0804843e , then should run gdb -q proof.
view the stack with x/8x $esp .
0xbffff960: 0x080484e0 0xbffffbb1 0x0804846b 0xb7fc4ff4
0xbffff970: 0x08048460 0x00000000 0xbffff9f8 0xb7e96e16
and print the string with value proof 0xbffffbb1 .
(gdb)x/s 0xbffffbb1
0xbffffbb1: "proof"
print the newly the stack with x/8x $esp and the result is.
0xbffff960: 0xe0 0x84 0x04 0x08 0xb1 0xfb 0xff 0xbf
do you understand ??, this bug is in all version of gdb .
will wait for you answer,please.
regards.
Technical Details
Message-ID:
<mailman.18852.1359819639.855.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!k2ni8451qap.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!news.mi.ras.ru!goblin2!goblin.stu.neva.ru!newsfeed.tele2net.at!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f0ead4270c,622731240da8fcc,start
X-Google-Attributes: gidf0ead4270c,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
X-Received: by 10.224.176.196 with SMTP id bf4mr6625419qab.4.1360022916972;
Mon, 04 Feb 2013 16:08:36 -0800 (PST)
Path: arc1-ca.pugleaf.net!k2ni8451qap.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!news.mi.ras.ru!goblin2!goblin.stu.neva.ru!newsfeed.tele2net.at!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!not-for-mail
From: sfddfsd <angelofthedark@windowslive.com>
Newsgroups: gnu.gdb.bug
Subject: GDB all VERSION
Date: Fri, 1 Feb 2013 22:04:48 +0000
Lines: 42
Approved: bug-gdb@gnu.org
Message-ID: <mailman.18852.1359819639.855.bug-gdb@gnu.org>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
X-Trace: usenet.stanford.edu 1359819639 22744 208.118.235.17 (2 Feb 2013 15:40:39 GMT)
X-Complaints-To: action@cs.stanford.edu
To: gnu@gnu.org, bug-gdb@gnu.org
Envelope-to: bug-gdb@gnu.org
X-EIP: [cxQYSQo0LD/dba0+kdT8bKRobCfbdb4e]
X-Originating-Email: [angelofthedark@windowslive.com]
User-Agent: Mozilla/5.0 (X11; Linux i686;
rv:10.0.11) Gecko/20121123 Icedove/10.0.11
X-Enigmail-Version: 1.4.1
X-OriginalArrivalTime: 02 Feb 2013 01:05:32.0858 (UTC)
FILETIME=[668E81A0:01CE00E1]
X-detected-operating-system: by eggs.gnu.org: Windows XP
X-Received-From: 65.55.111.99
X-Mailman-Approved-At: Sat, 02 Feb 2013 10:40:38 -0500
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=subscribe>
Bytes: 2798
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit