[0/2] Make gdbserver work with filename-only binaries

Message ID 20180210014241.19278-1-sergiodj@redhat.com
Headers show
  • Make gdbserver work with filename-only binaries
Related show


Sergio Durigan Junior Feb. 10, 2018, 1:42 a.m.
These two patches fix the issue pointed by Simon on IRC, that
gdbserver doesn't recognize filename-only binaries anymore:

  $ gdbserver :1234 a.out
  /bin/bash: line 0: exec: a.out: not found
  During startup program exited with code 127.

The first one is a preparation patch (and can go in independently),
which moves path-manipulation functions from utils.c to a new
common/pathstuff.c, making them available for gdbserver as well.

The second patch is the fix itself.

More details in each message.