10-16-2003
Oh dear. When you use gcc/g++ to compile a program and if you don't specify the -o switch, the output is written to the file named "a.out".
Either you
gcc text2.c -o text2 -g
gdb ./text2
or
gcc text2.c -g
gdb ./a.out
10 More Discussions You Might Find Interesting
1. Programming
Which is better??
I have always been a gdb fan.. But ppl say dbx is beter better for debugging the core.. Do all GDB lovers agree to it???
:cool: (1 Reply)
Discussion started by: jyotipg
1 Replies
2. Programming
Can anyone give me the link to a website having gdb tutorials
(for advanaced debugging & shortcuts)
http://www.burneddowndays.com/talk/YaBBImages/rolleyes.gif (1 Reply)
Discussion started by: wojtyla
1 Replies
3. Programming
If an executalbe file has several parameters, gdb can not pass parameters correctly. Let us see:
run:
./executablefile1 agr1 arg2 arg3
debug:
gdb executablefile1
run executalbefile1 arg1 arg2 arg3
then argv : executablefile1
argv : executablefile
argv : arg1
... (3 Replies)
Discussion started by: cdbug
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
This is a simple question on GDB. Given a core file, how can you check which process has dumped the core?
Regards
- Krishna (1 Reply)
Discussion started by: krishnamurthig
1 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I wanted to know if there is a core file generated and I am not sure for which Binary it is generated .
Can I use gdb to debug the core file ?
Thanks. (1 Reply)
Discussion started by: shubhranshu
1 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I am trying to execute a binary and it is giving Segmentation Fault.
Can I use gdb to debug this error?
Secondly there is no core file generated , so when I an trying to run gdb with the binary only I am not able to set any breakpoints.
When I am running the gdb and the I am... (1 Reply)
Discussion started by: shubhranshu
1 Replies
7. Programming
Hello,
I am having problem with debugging my code. I am writing a C code and then I compile it with the Makefile. I make a target file and then copy it in my Robot(Khepera III) and then run the program over there.
I compile it ofcorse on my machine and then copy the compiled file in the... (10 Replies)
Discussion started by: mind@work
10 Replies
8. Programming
i have created some break points in gdb.
let's say....
b sqlcxt
how can i know the breakpoint name of sqlcxt ??? (1 Reply)
Discussion started by: lipun4u
1 Replies
9. Programming
Hi, I got:
host machine: RedHat (RHEL6)
virtual machine: RedHat (RHEL6)
I run (on host machine):
qemu-system-x86_64 ...... -S -s
after that i run (on host machine):
gdb
target remote localhost:1234
set architecture i386:x86-64
and then i can use (on host machine) 'ctrl + c' to... (2 Replies)
Discussion started by: Chrisdot
2 Replies
10. Programming
Hi, all
I try to understand the output from gdb
Program received signal SIGABRT, Aborted.
*** glibc detected *** /home/sys_cbo/dev/zif/bin/Debug/zifd: free(): invalid pointer: 0x00007fffac04d3d0 ***
how should i read this?
(gdb) backtrace
#0 0x0000003015e32925 in raise () from... (1 Reply)
Discussion started by: huvcbo
1 Replies
LEARN ABOUT DEBIAN
hardened-cc
HARDENED-CC(1) Debian GNU/Linux HARDENED-CC(1)
NAME
hardened-cc - gcc wrapper to enforce hardening toolchain improvements
SYNOPSIS
export DEB_BUILD_HARDENING=1
gcc ...
DESCRIPTION
The hardened-cc wrapper is normally used by calling gcc as usual when DEB_BUILD_HARDENING is set to 1. It will configure the necessary
toolchain hardening features. By default, all features are enabled. If a given feature does not work correctly and needs to be disabled,
the corresponding environment variables mentioned below can be set to 0.
ENVIRONMENT
DEB_BUILD_HARDENING=1
Enable hardening features.
DEB_BUILD_HARDENING_DEBUG=1
Print the full resulting gcc command line to STDERR before calling gcc.
DEB_BUILD_HARDENING_STACKPROTECTOR=0
Disable stack overflow protection. See README.Debian for details.
DEB_BUILD_HARDENING_RELRO=0
Disable read-only linker sections. See README.Debian for details.
DEB_BUILD_HARDENING_FORTIFY=0
Don't fortify several standard functions. See README.Debian for details.
DEB_BUILD_HARDENING_PIE=0
Don't build position independent executables. See README.Debian for details.
DEB_BUILD_HARDENING_FORMAT=0
Disable unsafe format string usage errors. See README.Debian for details.
NOTES
System-wide settings can be added to /etc/hardening-wrapper.conf, one per line.
The real gcc symlinks are renamed gcc.real, and a diversion is registered with dpkg-divert(1). Thus hardened-cc's idea of the default gcc
is dictated by whatever package installed /usr/bin/gcc.
SEE ALSO
hardened-ld(1) gcc(1)
Debian Project 2008-01-08 HARDENED-CC(1)