|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Xcode 2.3 help
Hi
I'm using xcode 2.3 on OS 10.4.6 and the GDB to work with a project written in c++ the GDB runs fine, except it doesn't stop at my breakpoints anyone know why this might be? |
|
#2
|
||||
|
||||
|
__________________
~James [Not currently seeking freelance work] Like philosophy or interested in spirituality? Philosophorum. Game Dev Experts Forums Foresight Linux - Because your desktop should be cool! Linux FAQ FedoraFAQ UbuntuGuide Last edited by LinuxPenguin : May 30th, 2006 at 08:48 PM. |
|
#3
|
|||
|
|||
|
I tried inserrting said code, here's a sample of where I placed it
Code:
#ifdef DEBUG
asm("nop");
#endif
using namespace std;
class EquationRef {
private:
string eq_unsplit;
vector <float> split_values; //a,b,c,d
int dimensions;
string half[2];
this is in a header file it doesn't work |
|
#4
|
|||
|
|||
|
I should mention that this is written in C++
so, I tried placing it at the begining of the methods where the breakpoints were this didn't work either |
|
#5
|
||||
|
||||
|
Yes, it should be placed at the beginning of the methods. You did do a full rebuild after changing this, right?
|
|
#6
|
|||
|
|||
|
yes
|
|
#7
|
||||
|
||||
|
I don't use Xcode, so i was presuming it defined DEBUG. At the top of the file add this
#ifndef DEBUG #define DEBUG #endif |
|
#8
|
|||
|
|||
|
it didn't work
|
|
#9
|
||||
|
||||
|
How are you setting your breakpoints now?
you should be doing them functionlabel+1 the +1 is critical. |
|
#10
|
|||
|
|||
|
I'm clicking in the margin on the line, xcode sets a breakpoint
|
|
#11
|
||||
|
||||
|
Oh right, I got the impression you were using GDB manually. Hrm, not got a lot of a clue about what might be causing that. Usually just that nop switch fixes most things. How odd...
|
|
#12
|
|||
|
|||
|
how do I use GDB manually?
|
|
#13
|
||||
|
||||
|
you compile the file with the -gstabs parameter
$ gcc -Wall -gstabs file.c -o file.o $ gdb file.o presumably in debug mode the compiler enables gstabs anyway, so if you just go to find the output binary and run gdb against that. Bear in mind it isn't particularly easy, nowhere near as much so as in xcode. One thing to look at is making sure that the point you're trying to break at IS being reached. try using debug output statements to confirm that. That's all I can think if it's not the nop problem... |