Article View: comp.unix.programmer
Article #3634Gdb Bug ? e showing \e in core file and/or attactch program.
From: raxit
Date: Thu, 10 Jan 2008 10:47
Date: Thu, 10 Jan 2008 10:47
72 lines
3504 bytes
3504 bytes
Hi,
here is a small program. when, when i am debugging, <and analyzing
core> it shows me All e replaced by \e <Correction, I doubt Not All e,
but some e.> here is the sample program and output.
Is this gdb Bug ? <on AIX>
<please note : i am unable to check this on latest version of gdb.>
bash-3.00$ cat test.c
#include<stdio.h>
#include<memory.h>
#include<stdlib.h>
#include<unistd.h>
int main ()
{
char *some_array="mera naam raxit hain, these are more eeeeeee";
printf("\n Just printing Array Whroooooooom = %s",some_array);
memcpy(0x0,0x0,10000);/* Intentional */
sleep(10);
printf("Run Successfully...Buggy ");
return 0;
}
bash-3.00$ gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/
ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --
enable-threads --enable-version-specific-runtime-libs --host=powerpc-
ibm-aix5.3.0.0
Thread model: aix
gcc version 4.0.0
bash-3.00$ gcc test.c -g3 -Wall
test.c: In function 'main':
test.c:9: warning: null argument where non-null required (argument 1)
test.c:9: warning: null argument where non-null required (argument 2)
bash-3.00$ gdb a.out
GNU gdb 6.0
Copyright 2003 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 "powerpc-ibm-aix5.1.0.0"...
(gdb) b 8
Breakpoint 1 at 0x1000053c: file test.c, line 8.
(gdb) r
Starting program: /usr1/armor/102/Raxit/a.out
Breakpoint 1, main () at test.c:8
8 printf("\n Just printing Array Whroooooooom =
%s",some_array);
(gdb) p some_array
$1 = 0x10007670 "m\era naam raxit hain, th\es\e ar\e mor\e \e\e\e\e\e\e
\e"
(gdb) quit
The program is running. Exit anyway? (y or n) y
Any Idea, ?
-Raxit
http://www.mykavita.com <--- Write your Own Poem !
Technical Details
Message-ID:
<cbb7ce8a-3cc3-417b-9fe2-5b5be3d525c8@n22g2000prh.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!n22g2000prh.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fc89c,853683c0e3f21cf9,start X-Google-Thread: 115614,853683c0e3f21cf9,start X-Google-Thread: 1014db,853683c0e3f21cf9,start X-Google-Thread: f5053,853683c0e3f21cf9,start X-Google-Attributes: gidfc89c,gid115614,gid1014db,gidf5053,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!n22g2000prh.googlegroups.com!not-for-mail From: "raxit@mykavita.com" <raxit@mykavita.com> Newsgroups: comp.unix.programmer, comp.unix.aix, comp.lang.c, gnu.gdb.bug Subject: Gdb Bug ? e showing \e in core file and/or attactch program. Date: Thu, 10 Jan 2008 02:47:31 -0800 (PST) Organization: http://groups.google.com Lines: 72 Message-ID: <cbb7ce8a-3cc3-417b-9fe2-5b5be3d525c8@n22g2000prh.googlegroups.com> NNTP-Posting-Host: 203.199.116.22 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1199962051 1783 127.0.0.1 (10 Jan 2008 10:47:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Jan 2008 10:47:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n22g2000prh.googlegroups.com; posting-host=203.199.116.22; posting-account=DHwQYAoAAAD9GwpZrzpDipodWaA3hdY7 User-Agent: G2/1.0 X-HTTP-Via: 1.1 SDF5-ISA X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)