debugging stripped-down linux system - gdb

I'm having a problem on my embedded linux board. My program runs, then somewhere in a particular function throws a segmentation fault. So i'm trying to track down why this is happening so I can fix it.
The problem is that my target board runs a filesystem image which does not include gdb or gdbserver. Is there any way I can debug this application as it runs on the embedded target without rebuilding the kernel or my application?

Related

QT compiled program (which runs within QT IDE) wont run using the terminal

so i've made a little program to get sensor data and plot it in a graph.
While the program compiles and runs fine within QT (Debug or Release), it wont start within the terminal. Furthermore once I'm activating the "use terminal" setting within the QT project settings I'm getting the same issue.
The error message (from the terminal) gives an segmentation fault.
How can it be that while it runs within QT, at the same time I'm getting the error using terminal?
Thanks for your help!

program crash due to ntdll.dll

I've created a program (vs2010,c++,win7), it's a multithreaded and has modules.
The program that communicates with some hardware.
I run this program in a clean computer that has only win7 and the drivers of the hardware.
After using my program for a while, one of the modules crashes.
I tried to debug the program in the development computer and the call stack show me only calls to "ntdll.dll", i also tried to create a dump file from the program in the testing computer
and I've got the same results.
Usually the module crash when there is a lot of load on all the modules.
I've no idea from where to start to debug this program, so I'm open to ideas.
EDIT:
also i got the exception "0xc0000374 a heap has been been corrupted"
tnx.

remote DBG via TCP cannot find bounds of current function

I am trying to remotely debug a linux machine c++ hello world code from a windows client. I am Debuging from windows 7 to Beaglebone Black running ubuntu. I remember i had similar issues when i was debuging from a linux machine to raspberry pi host.
The problem is, when i start debbuging i cant step anywhere because i am getting ths message:
I provided the gdb debugger and executable for the client program within i debug from but i have no clue what else shuld i give? One thing is that when i instead of stepping continue through the code, i finally get to my breakpoint but i get segfault at the end anyways. How can i provide the apropriate info for the debugger?
Any help would be really aprichiated.

python package compiled with nuitka fails with segmentation fault

I'm developing an embedded device controlled by a python2.7 script. And I need to compile the source for both security (I don't want device users to mess with my sources) and performance (I'm working on an BeagleBone Black, ARM microPC, and it's pretty short on CPU/RAM).
I'm using Nuitka python compiler for this. I've tried compiling separate modules of my application and it works fine, I can transparently replace random .py with it's compiled .so analogue and it all works fine.
Yet if I try to compile whole application into solid blob - it doesn't work. Meaning that Nuitka compiles whole application with no problem, but when I try to run the resulting binary - I get Segmentation fault and that's it. No debug output, no clues on what's wrong.
So, any idea what is wrong with this thing and why it doesn't work?
Or at least how can I debug it and figure out why this segfault happens?
Did you try taking a look at the core file? That should give you an idea where the segmentation fault is happening.

Release build not working when run without debugging in VS2010

I encountered following problem:
I write program in c++ using VS2010. Debug build works properly when run with/without debugging in VS. When I launch built executable directly it also works.
Release build works when run with debugging in VS and alsp when I launch build executable directly.
Unfortunately, program does not work when I run release build in VS -without debugging-. Window is created and then program crashes quickly (without any error message). Since it crashes when run without debugging I don't know how to identify what causes the problem.
Any ideas what might be causing this? Thanks :)
It seems most likely you have some sort of memory error/corruption that just happens to work ok in the debugger.
You can try using couts to isolate how far/where it dies, or try a tool like Purify (or valgrind for free if you can port to Linux).