This is the mail archive of the
mailing list for the GDB project.
Re: Debug ARM semihosting Thumb-2 binary
On 23 February 2012 14:12, Jonas Maebe <firstname.lastname@example.org> wrote:
> Without gdb attached, the qsort_large binary shows this output:
> Sorting 50000 vectors based on distance from the origin.
> 25138398 28611231 9838998
> With gdb attached, this is the output:
> Sorting 0 vectors based on distance from the origin.
> So it seems the reading of the input file fails.
I look into my crystal ball and deduce that you're running gdb
in the wrong directory. When you do semihosting via gdb syscalls
the file opens are for paths relative to gdb's working directory,
not qemu's. This particular test seems to have no error handling
so if it can't open the file it will happily proceed to sort