aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-04-11 18:37:14 +0000
committerDoug Evans <dje@google.com>2012-04-11 18:37:14 +0000
commitbc3aa6c30087ecab7a06ec986344d2954e7c847c (patch)
treeff3a7a779fc7da8b2c91d6315ad8a9ed64606268 /gdb/source.c
parent9e529e1d3d54431b6e1b0433efe8203887c0580f (diff)
downloadgdb-bc3aa6c30087ecab7a06ec986344d2954e7c847c.zip
gdb-bc3aa6c30087ecab7a06ec986344d2954e7c847c.tar.gz
gdb-bc3aa6c30087ecab7a06ec986344d2954e7c847c.tar.bz2
* source.c (find_and_open_source): Consistently pass resulting
full path through xfullpath.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 97f5d46..9b464f9 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -997,7 +997,16 @@ find_and_open_source (const char *filename,
result = open (*fullname, OPEN_MODE);
if (result >= 0)
- return result;
+ {
+ /* Call xfullpath here to be consistent with openp
+ which we use below. */
+ char *lpath = xfullpath (*fullname);
+
+ xfree (*fullname);
+ *fullname = lpath;
+ return result;
+ }
+
/* Didn't work -- free old one, try again. */
xfree (*fullname);
*fullname = NULL;