1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
From: =?utf-8?b?SMOpY3RvciBPcsOzbiBNYXJ0w61uZXo=?= <[email protected]>
Date: Wed, 20 Feb 2019 13:25:36 0100
Subject: Patch out a PATH_MAX usage, for Hurd's benefit
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Author: Svante Signell <[email protected]>
Bug-Debian: http://bugs.debian.org/709508
Forwarded: http://sourceware.org/ml/gdb-patches/2013-05/msg00878.html
Reviewed-By: Héctor Orón Martínez <[email protected]>
Last-Update: 2013-06-08
---
gdb/nto-tdep.c | 12 ---
1 file changed, 9 insertions( ), 3 deletions(-)
Index: gdb/gdb/nto-tdep.c
===================================================================
--- gdb.orig/gdb/nto-tdep.c
gdb/gdb/nto-tdep.c
@@ -157,10 157,12 @@ nto_find_and_open_solib (const char *sol
void
nto_init_solib_absolute_prefix (void)
{
- char buf[PATH_MAX * 2], arch_path[PATH_MAX];
char *buf, *arch_path;
char *nto_root;
const char *endian;
const char *arch;
int arch_len, len;
#define FMT "set solib-absolute-prefix %s"
nto_root = nto_target ();
gdbarch *gdbarch = current_inferior ()->arch ();
@@ -184,9 186,13 @@ nto_init_solib_absolute_prefix (void)
== BFD_ENDIAN_BIG ? "be" : "le";
}
- xsnprintf (arch_path, sizeof (arch_path), "%s/%s%s", nto_root, arch, endian);
arch_len = strlen (nto_root) 1 strlen (arch) strlen (endian) 1;
arch_path = alloca (arch_len);
xsnprintf (arch_path, arch_len, "%s/%s%s", nto_root, arch, endian);
- xsnprintf (buf, sizeof (buf), "set solib-absolute-prefix %s", arch_path);
len = strlen (FMT) - 2 strlen (arch_path) 1;
buf = alloca (len);
xsnprintf (buf, len, FMT, arch_path);
execute_command (buf, 0);
}
|