While debugging a program I noticed a structure declaration that contains an undefined type but GCC isn't flagging it with a warning or error. Why would that be the case?
Here is an example using an undefined structure type of 'notdef':
struct Notdef *mystruct;
Notdef isn't defined anywhere but the declaration isn't flagged.
On the other hand if I declare a simple pointer the same way it gets flagged as an error by GCC.
On my SAM460ex , i don't seem to be able to step htrough the code.
Using a simple program in which i did put 3 breakpoints only the first is reognised, then using either next step or continu the program always proc'dds til the opening of the window. IONLY thing i can do is close the window, but this generates no additional output.
It is not clear to me how you can set breakpoints elsewhere than in the main() containing source module.
This is the only one that is visible in the LV.
Are the breakpoints saved somewhere? If not automatically how can you do this ?
I am debugging a problem in a program and have read the GDB tutorials available here. Thanks everyone for your work putting those together! They help a lot!
Quick question though....is there a command in GDB that allows me to view, in hex, a group of bytes or words - say 256 bytes worth... something similar to the display command that updates with each step?
Or do I need to use some other tool to examine memory in hexidecimal while running GDB, and if so, what tool would work?
I have tried to modified the code below found on the net
- so as to compile for gcc
- so as tot always return a Lock on the fullpath (if it can be found) of the file that could be somewhere in the path ( i suppressed the "if (file > 0)
block)
When you use strerro(errno) i understand it gives you information about the failure type of last C-lib function used.
I seem to get a "Function not implemented" error in a "switch" construct in case i get till the end of the "case"'s and not finding a match. Thar's OK for me.
If you complie separately say 3 components to objectfiles
gcc -c file1.c
gcc -c file2.c
gcc -c file3.c
is the following commandline correct
gcc file1.0 file2.o file3.o -gstabs -o myapp
or do i have to use -gstabs also in 3 first compilatoons ?