This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: Better realpath
- From: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- To: "'Vladimir Prus'" <vladimir at codesourcery dot com>, <gdb-patches at sources dot redhat dot com>
- Date: Sat, 14 Jun 2008 12:31:32 +0200
- Subject: RE: Better realpath
- References: <200806141024.41812.vladimir@codesourcery.com>
I just looked at your patch and the idea seems
good... But I am no expert on this field.
One question though, libiberty lrealpath
function uses strdup, while the replaced
code uses xstrdup.
xstrdup is also defined in libiberty
as being a replacement of strdup that never
fails... (didn't really get how this is
possible...)
Anyhow, is this a potential issue?
Pierre Muller
Pascal language support maintainer for GDB
-----Message d'origine-----
De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] De la part de Vladimir Prus
Envoyà : Saturday, June 14, 2008 8:25 AM
à : gdb-patches@sources.redhat.com
Objet : Better realpath
GDB has a function to get real path of a file, gdb_realpath. Unfortunately, that function is essentially a copy-paste of libiberty's lrealpath, with the extra bonus that gdb_realpath *does not* have any Windows-specific code. As result, GDB is not capable to simplify ".." in windows paths, and among other problems, breakpoints set using full file names containing ".." will not work.
This patch makes GDB use libibery's lrealpath. OK?
- Volodya
gdb/
* utils.c (gdb_realpath): Use lrealpath.