Programming :: How To Debug Macros Under Gdb
Jun 14, 2010
It seems GDB can not expand or show the macro expansion or its definition under the GDB debug to while debugging the program. how to debug macros under GDB?
Sample Code:
#include <stdio.h>
#include "sample.h"
#define M 42
#define ADD(x) (M + x)
[code]....
View 7 Replies
ADVERTISEMENT
Apr 21, 2009
downloaded a project from the Internet and tried to debug it, but run into a problem. i managed to copy the part where it build the executable I need. The problem is that I cannot use gdb with this executable for some reason. However, running the it without gdb seems to work ok. Below is what it shows when compiling and link.
Compile:
Code:
gcc -g -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION=""
-DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE="sphinx3"
-DVERSION="0.7" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
[code]....
View 9 Replies
View Related
Mar 3, 2011
I have a html page that calls a c cgi script on my local server; how can i view the html page and debug the script at the same time? if i would give some input in a form on the html page then i want to debug the script with the entered data. my gues was with w3m and gdb but i don't know how its done...
View 9 Replies
View Related
Jan 31, 2010
I want debug kernel.bin
this file is boot in floppy
View 1 Replies
View Related
Nov 15, 2010
I have developed an application written in C, Linux well tested and stripped off all the symbols for final deployment. When I'm testing the stripped off version of the application in the field. Here the application has got crashed. Now how to debug the application.
View 6 Replies
View Related
Jun 16, 2010
debug my code as root in eclipse without starting the eclipse as root? I searched on the net, and seems like it is not possible.
View 4 Replies
View Related
Aug 25, 2009
is there a way to debug my library files from DDD? Basically a way to pass the paths to DDD so I can view the source etc. I'm having a segmentation nightmare, which only crops up about every 10 or so starts, I know it's in one file in a library. I could move the source file into my general code to debug, but am sure there's a way in DDD.
View 1 Replies
View Related
Jun 26, 2011
I am trying to debug the dsdv.cc file of ns-2. I have attached the screenshots of the results.I added ns-2.34 as project in eclipse then opened dsdv.cc file. given a ".TCL" file as argument it runs ok. as in screenshot-1 but when i want to debug it gives the error "No Source Available for main at 0x83b269f" shown in screenshot-2.
View 1 Replies
View Related
Jun 21, 2010
I'm using ubuntu 9.04;I want to debug my project that comprises mutiple files.When I cd to the project folder and run the command "gdb rawusb_test",Once I tried the flag -g and changed the line "$(CC) -o $(PROG) $(OBJS) $(LIBS)" to "$(CC) -g -o $(PROG) $(OBJS) $(LIBS)", it didn't work!I want to trace the program "rawusb_test" line by line and see the parameters' values!Could you help me how I should debug this project or how the Makefile should be changed?
View 8 Replies
View Related
Nov 11, 2009
Now I have a project which include three directories /bin, /inc and /src. All of header files (*.h) are included in /inc and all of source(*.c) files are stored in /src, i.e. a.c, b.c, c.c..., the final generated executable file will locate in /bin. after compling with makefile, all of obj files will be generated in /src/obj like a.o, b.o, c.o, d....! Moreover an final.exe executable file will be generated in the /bin directory. Now if I want to debug it with GDB, how can I do it?
View 1 Replies
View Related
Apr 26, 2010
I want to know how can I debug shell scripts.Many a times I found while installing a software or a package some where some link to some file or dependency is broken.Some one suggested me use of -vx in the beginning I want to know what are the other methods to debug shell scripts.
View 1 Replies
View Related
Nov 11, 2010
I'm trying to debug the NTLM LWP module.
I added use LWP:ebug qw(+); to the top of my script, but I can't see any change.
I'm on Windows if that makes a difference (installed activeperl).
I know there are probably a million reasons why something perl won't work, but can anyone help me get debug logging showing up?
View 1 Replies
View Related
Oct 8, 2014
I have Windows 7==>Oracle VB==>Ubuntu==>Gfortran. How do I debug fortran programs? I would like to have a step by step debugging.
View 1 Replies
View Related
May 6, 2010
After doing make I have the following questions? How can I see that the build is with debug information? What shall I do to build the release version? Can I have the release version in one directory and the debug version in another? I mean, when I change from debug to release, make will not overwrite the debug version.
View 7 Replies
View Related
Oct 17, 2010
I am trying to debug a src code that I download from the Internet.It is built with libtool. I am able to debug it with gdb, but i cannot debug it with eclipse.
View 3 Replies
View Related
Jun 4, 2011
Is it possible to debug remotely a java program with ddd (data display debugger)?
View 2 Replies
View Related
Jul 25, 2011
1 system info:
root@yes-desktop:/usr/src/eglibc-2.11.1/malloc# uname -a
Linux yes-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
2 gcc version
root@yes-desktop:/usr/src/eglibc-2.11.1/malloc# gcc -v
Using built-in specs.
[code]....
1 why cann't i debug the test? because i can't step into the "operator new" function.
View 2 Replies
View Related
Mar 4, 2010
I've been trying to work out a way to stop chunks of code being compiled using a variable in my makefile but can't work it out. What I mean is for example in my code I might have.
/****output comms portdata********/
printf("
debug comms port %d",ReadPort("ttys1);
I only wish this code to be compiled when I'm debugging. What I've tried is using #ifdef with
#ifdef COMM_PORT_DEBUG
printf("
debug comms port %d",ReadPort("ttys1);
#endif
Then in my make file I set COMM_PORT_DEBUG to 1 so
DEBUG_DEFS = COMM_PORT_DEBUG=1
I then thought I could put it into my in my link line
all: $(CC) $(CPFLAGS) $(DEBUG_DEFS) $(INC_PATHS) $(SOURCE) -o $(PROGRAM) $(LIB_DIRS) $(GAME_LIBS)
but this gives a
gcc: COMM_PORT_DEBUG=1: No such file or directory
is there a way to do this sort of thing? Or am I barking up the wrong tree?
View 1 Replies
View Related
Nov 23, 2010
I want to allow my program to be able to run in DEBUG mode. i.e., I want to be able to run ./program, and I want to be able to run ./program -v to show all the debug output. How do I go about setting up something like that?
View 3 Replies
View Related
Oct 21, 2010
I am developing an application whose executable is generated inside a certain folder hierarchy (say: /DevPath/MyProject/bin). My source code is located in a different branch of this hierarchy (say: /DevPath/MyProject/src). When my app crashes, its core files are stored in /DevPath/MyProject. I'm developing the app on a pc, but running it on a separate platform in which i can only execute it. Folder hierarchy is the same as above on both computers. Usually, when a new executable version is ready, we update both the executable and the source code on the target platform, transferring all the new /DevPath/MyProject folder on it. But sometimes it can really be a bother, so we update only the executable.
1)In the case we only update the executable, keeping an old source code version, and the app generates a core file, can i trust the backtrace produced by gdb in this case? I.e., does gdb need the latest source code files or it just needs the debugging information?
2) (More radical question ) Do i really need to keep the source code on the target platform for core dump analysis or i just need the executable?
View 1 Replies
View Related
May 25, 2011
running a java application in a remote site,and I would like to debug the application. I'm using jdb, and, due to network architecture, I can only use jdb do debug in text-mode. To debug in text-mode I use the command: jdb -attach remotesite: port. At this point this is ok. Now I would like to attach the source code to the jdb. I tried the command
jdb -attach remotesite: port ~/src/org/path/file.java
to attach the source code to the remote debug to. But it doesn't work. In jdb, I try the command use ~/src/org/path/file.java but it doesn't work either. How can I attach the source code to the remote debug?
View 1 Replies
View Related
May 10, 2011
I would like to extract debug information but I have some problems. For example, I have a executable a.out...
Quote:
nm -f sysv a.out | grep ".global_var" >vars.txt
With this command I extract all my variables. All of them are in .global_var section, and it give me follow information:
Quote:
CAN_station_n |08073258| D | OBJECT|00000001| |.global_var
CONTROLend |080732a7| D | OBJECT|00000001| |.global_var
[code]....
Well, I have only address of my vars, but I would like to know type var or struct of the variables. With dwarf dump I have all of information, but it is a mess...
Quote:
<1><117bc>: Abbrev Number: 32 (DW_TAG_variable)
<117bd> DW_AT_name : (indirect string, offset: 0x153d): draw_limits
<117c1> DW_AT_decl_file : 128
<117c2> DW_AT_decl_line : 207
[code]...
Is there any parser or way to put in order this information?? create a file with the follow information:
name of var - address - type - size - struct or not
View 5 Replies
View Related
Jul 9, 2010
OpenSuse 11.2 (64 bit)
GDB 6.8.91.20090930-2.4
I ran GDB on a program and am receiving following errors,
Code:
anisha@linux-uitj:~/junk> g++ -g jk.cpp
anisha@linux-uitj:~/junk> gdb a.out
GNU gdb (GDB) SUSE (6.8.91.20090930-2.4)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later [URL]
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see: [URL] ...
Reading symbols from /home/anisha/junk/a.out...done.
(gdb) b readline
Breakpoint 1 at 0x400b90: file jk.cpp, line 19.
(gdb) r
Starting program: /home/anisha/junk/a.out
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C "debuginfo(build-id)=591af1afa33f255704fb6a60859b93d00e205302"
Missing separate debuginfo for /usr/lib64/libstdc++.so.6
Try: zypper install -C "debuginfo(build-id)=62220ad5c8941afb5d332c0c47d32f8beec8ac50"
Missing separate debuginfo for /lib64/libm.so.6
Try: zypper install -C "debuginfo(build-id)=57fc1891d8d9f419fb8c7fc06a8285563b53a47e"
Missing separate debuginfo for /lib64/libgcc_s.so.1
Try: zypper install -C "debuginfo(build-id)=0206e11fa8ca0db0633073adcbf1349a7871e1dc"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C "debuginfo(build-id)=c5a3dfd66bf61fcdec9bc22153b2fbd0d6697960"
can't open input file (null)
Program exited with code 01.
(gdb)
View 1 Replies
View Related
Apr 24, 2010
what are self-referential macros in C?Could you give simple example for the same
View 1 Replies
View Related
Feb 23, 2010
I've installed mono developer, but when I want to make debug I got this message : Build failed. ApplicationName='/usr/bin/gmcs', CommandLine='"@/tmp/tmp17a7a5e2.tmp"', CurrentDirectory= ...
View 1 Replies
View Related
Feb 18, 2010
I am trying to use the 'autoconf' command and I keep getting an error message saying I need to have xorg-macros 1.3 or later. I have downloaded both 1.4 and 1.6.0 and tried to install them. Apparently all to no avail, because when I run the autoconf script it comes back as saying I only have 1.2.2 installed. Where do I start looking to figure out what I am screwing up?When I run the configure script in the util-macros-1.6.0 it seems to run right. Then I run make and it says "nothing to do for 'all'". Then I run 'make install' and it seems to run that but apparently it isn't getting installed.
Here is the output of ./configure;make;make install
linux-y52a:/home/alton/Download/util-macros-1.6.0 # ./configure;make;make install
checking for a BSD-compatible install... /usr/bin/install -c
[code]....
View 2 Replies
View Related
Apr 14, 2011
I've installed jEdit following instructions here [URL]... In trying to record a macro Macros > Record Macro I can see "Macro recording" message in status bar but no macro code is generated and no macro can be run. on getting macros to work in jEdit?
View 3 Replies
View Related
Jul 18, 2010
Is there any application which can fulfil keybaord macros which I set?I need something which can press DOWN, DOWN, DOWN, DOWN, SHIFT+UP, SHIFT+UP, SHIFT+UP, BACKSPACE. And then repeat that cycle for a long period of time.
View 2 Replies
View Related
Nov 27, 2010
I would like to call some firefox macros from bash so that I can manipulate them in some scripts. Does anyone know how to do that?Currently I'm using the imacros firefox add-in
View 1 Replies
View Related
Jun 6, 2011
I am using LibreOffice under Ubuntu 10.10 and Windows XP, and trying to record some macros. I can find no documentation with for recording macros. There are some forum threads of individuals, but the replies all recommend external programs. LibreOffice has its own macro recorder, doesn't it? It is on the Tools menu, as in previous versions of OpenOffice, but "record macro" is blanked out. Is this because LibreOffice 3 can't do macros? I have no idea why an external program should be needed.
View 1 Replies
View Related