Thread View: comp.unix.programmer
1 messages
1 total messages
Started by raxit
Thu, 10 Jan 2008 10:47
Gdb Bug ? e showing \e in core file and/or attactch program.
Author: 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 !
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