This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Debug ARM semihosting Thumb-2 binary


On 23 February 2012 14:12, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
> Without gdb attached, the qsort_large binary shows this output:
>
> ***
> Sorting 50000 vectors based on distance from the origin.
>
> 25138398 28611231 9838998
> [etc]
> ***
>
> 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
no data...

-- PMM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]