public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Tune default DEBUGDIR for NetBSD
@ 2020-04-08 17:15 Kamil Rytarowski
  2020-04-08 17:18 ` Christian Biesinger
  2020-04-17 14:54 ` Kamil Rytarowski
  0 siblings, 2 replies; 8+ messages in thread
From: Kamil Rytarowski @ 2020-04-08 17:15 UTC (permalink / raw)
  To: gdb-patches

NetBSD uses a custom debug file directory /usr/libdata/debug
for the basesystem and does not use separate debug files in
pkgsrc (3rd party package collections).

gdb/ChangeLog:

        * configure.ac: Handle NetBSD specific DEBUGDIR.
        * configure: Regenerate.
---
 gdb/ChangeLog    |  5 +++++
 gdb/configure    | 11 ++++++++++-
 gdb/configure.ac | 11 ++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7ea85799211..af6844b6ace 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-08  Kamil Rytarowski  <n54@gmx.com>
+
+	* configure.ac: Handle NetBSD specific DEBUGDIR.
+	* configure: Regenerate.
+
 2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>

 	* dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
diff --git a/gdb/configure b/gdb/configure
index afafc2c8d18..636a3f69f00 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
 fi


+case "${host}" in
+  *-*-netbsd*)
+    DEFAULTDEBUGDIR=/usr/libdata/debug
+    ;;
+  *)
+    DEFAULTDEBUGDIR=${libdir}/debug
+    ;;
+esac
+


 # Check whether --with-separate-debug-dir was given.
@@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
   withval=$with_separate_debug_dir;
     DEBUGDIR=$withval
 else
-  DEBUGDIR=${libdir}/debug
+  DEBUGDIR=${DEFAULTDEBUGDIR}
 fi


diff --git a/gdb/configure.ac b/gdb/configure.ac
index b9dbe13232a..3cef95fbcb8 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
 fi
 AC_SUBST(MAKEINFO_EXTRA_FLAGS)

+case "${host}" in
+  *-*-netbsd*)
+    DEFAULTDEBUGDIR=/usr/libdata/debug
+    ;;
+  *)
+    DEFAULTDEBUGDIR=${libdir}/debug
+    ;;
+esac
+
 GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
     [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
-    [${libdir}/debug])
+    [${DEFAULTDEBUGDIR}])

 # We can't pass paths as command line arguments.
 # Mingw32 tries to be clever and will convert the paths for us.
--
2.25.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-08 17:15 [PATCH] Tune default DEBUGDIR for NetBSD Kamil Rytarowski
@ 2020-04-08 17:18 ` Christian Biesinger
  2020-04-08 17:20   ` Kamil Rytarowski
  2020-04-17 14:54 ` Kamil Rytarowski
  1 sibling, 1 reply; 8+ messages in thread
From: Christian Biesinger @ 2020-04-08 17:18 UTC (permalink / raw)
  To: Kamil Rytarowski; +Cc: gdb-patches

On Wed, Apr 8, 2020 at 12:16 PM Kamil Rytarowski <n54@gmx.com> wrote:
>
> NetBSD uses a custom debug file directory /usr/libdata/debug
> for the basesystem and does not use separate debug files in
> pkgsrc (3rd party package collections).
>
> gdb/ChangeLog:
>
>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>         * configure: Regenerate.
> ---
>  gdb/ChangeLog    |  5 +++++
>  gdb/configure    | 11 ++++++++++-
>  gdb/configure.ac | 11 ++++++++++-
>  3 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 7ea85799211..af6844b6ace 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
> +
> +       * configure.ac: Handle NetBSD specific DEBUGDIR.
> +       * configure: Regenerate.
> +
>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
>
>         * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
> diff --git a/gdb/configure b/gdb/configure
> index afafc2c8d18..636a3f69f00 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>  fi
>
>
> +case "${host}" in
> +  *-*-netbsd*)
> +    DEFAULTDEBUGDIR=/usr/libdata/debug

Wouldn't it be better to make this ${prefix}/libdata/debug?

> +    ;;
> +  *)
> +    DEFAULTDEBUGDIR=${libdir}/debug
> +    ;;
> +esac
> +
>
>
>  # Check whether --with-separate-debug-dir was given.
> @@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
>    withval=$with_separate_debug_dir;
>      DEBUGDIR=$withval
>  else
> -  DEBUGDIR=${libdir}/debug
> +  DEBUGDIR=${DEFAULTDEBUGDIR}
>  fi
>
>
> diff --git a/gdb/configure.ac b/gdb/configure.ac
> index b9dbe13232a..3cef95fbcb8 100644
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>  fi
>  AC_SUBST(MAKEINFO_EXTRA_FLAGS)
>
> +case "${host}" in
> +  *-*-netbsd*)
> +    DEFAULTDEBUGDIR=/usr/libdata/debug
> +    ;;
> +  *)
> +    DEFAULTDEBUGDIR=${libdir}/debug
> +    ;;
> +esac
> +
>  GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
>      [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
> -    [${libdir}/debug])
> +    [${DEFAULTDEBUGDIR}])
>
>  # We can't pass paths as command line arguments.
>  # Mingw32 tries to be clever and will convert the paths for us.
> --
> 2.25.0
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-08 17:18 ` Christian Biesinger
@ 2020-04-08 17:20   ` Kamil Rytarowski
  2020-04-08 17:28     ` Christian Biesinger
  0 siblings, 1 reply; 8+ messages in thread
From: Kamil Rytarowski @ 2020-04-08 17:20 UTC (permalink / raw)
  To: Christian Biesinger; +Cc: gdb-patches

On 08.04.2020 19:18, Christian Biesinger wrote:
> On Wed, Apr 8, 2020 at 12:16 PM Kamil Rytarowski <n54@gmx.com> wrote:
>>
>> NetBSD uses a custom debug file directory /usr/libdata/debug
>> for the basesystem and does not use separate debug files in
>> pkgsrc (3rd party package collections).
>>
>> gdb/ChangeLog:
>>
>>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>>         * configure: Regenerate.
>> ---
>>  gdb/ChangeLog    |  5 +++++
>>  gdb/configure    | 11 ++++++++++-
>>  gdb/configure.ac | 11 ++++++++++-
>>  3 files changed, 25 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 7ea85799211..af6844b6ace 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
>> +
>> +       * configure.ac: Handle NetBSD specific DEBUGDIR.
>> +       * configure: Regenerate.
>> +
>>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
>>
>>         * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
>> diff --git a/gdb/configure b/gdb/configure
>> index afafc2c8d18..636a3f69f00 100755
>> --- a/gdb/configure
>> +++ b/gdb/configure
>> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>  fi
>>
>>
>> +case "${host}" in
>> +  *-*-netbsd*)
>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>
> Wouldn't it be better to make this ${prefix}/libdata/debug?
>

Not really, as this path specifies the userland debug files only. In
third party we don't use separate debug files. The default prefix is
/usr/local and without specifying --prefix=/usr debug files won't work.

This path is already hardcoded in LLDB for this OS.

>> +    ;;
>> +  *)
>> +    DEFAULTDEBUGDIR=${libdir}/debug
>> +    ;;
>> +esac
>> +
>>
>>
>>  # Check whether --with-separate-debug-dir was given.
>> @@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
>>    withval=$with_separate_debug_dir;
>>      DEBUGDIR=$withval
>>  else
>> -  DEBUGDIR=${libdir}/debug
>> +  DEBUGDIR=${DEFAULTDEBUGDIR}
>>  fi
>>
>>
>> diff --git a/gdb/configure.ac b/gdb/configure.ac
>> index b9dbe13232a..3cef95fbcb8 100644
>> --- a/gdb/configure.ac
>> +++ b/gdb/configure.ac
>> @@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>  fi
>>  AC_SUBST(MAKEINFO_EXTRA_FLAGS)
>>
>> +case "${host}" in
>> +  *-*-netbsd*)
>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>> +    ;;
>> +  *)
>> +    DEFAULTDEBUGDIR=${libdir}/debug
>> +    ;;
>> +esac
>> +
>>  GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
>>      [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
>> -    [${libdir}/debug])
>> +    [${DEFAULTDEBUGDIR}])
>>
>>  # We can't pass paths as command line arguments.
>>  # Mingw32 tries to be clever and will convert the paths for us.
>> --
>> 2.25.0
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-08 17:20   ` Kamil Rytarowski
@ 2020-04-08 17:28     ` Christian Biesinger
  2020-04-24 14:38       ` Simon Marchi
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Biesinger @ 2020-04-08 17:28 UTC (permalink / raw)
  To: Kamil Rytarowski; +Cc: gdb-patches

On Wed, Apr 8, 2020 at 12:21 PM Kamil Rytarowski <n54@gmx.com> wrote:
>
> On 08.04.2020 19:18, Christian Biesinger wrote:
> > On Wed, Apr 8, 2020 at 12:16 PM Kamil Rytarowski <n54@gmx.com> wrote:
> >>
> >> NetBSD uses a custom debug file directory /usr/libdata/debug
> >> for the basesystem and does not use separate debug files in
> >> pkgsrc (3rd party package collections).
> >>
> >> gdb/ChangeLog:
> >>
> >>         * configure.ac: Handle NetBSD specific DEBUGDIR.
> >>         * configure: Regenerate.
> >> ---
> >>  gdb/ChangeLog    |  5 +++++
> >>  gdb/configure    | 11 ++++++++++-
> >>  gdb/configure.ac | 11 ++++++++++-
> >>  3 files changed, 25 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> >> index 7ea85799211..af6844b6ace 100644
> >> --- a/gdb/ChangeLog
> >> +++ b/gdb/ChangeLog
> >> @@ -1,3 +1,8 @@
> >> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
> >> +
> >> +       * configure.ac: Handle NetBSD specific DEBUGDIR.
> >> +       * configure: Regenerate.
> >> +
> >>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
> >>
> >>         * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
> >> diff --git a/gdb/configure b/gdb/configure
> >> index afafc2c8d18..636a3f69f00 100755
> >> --- a/gdb/configure
> >> +++ b/gdb/configure
> >> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
> >>  fi
> >>
> >>
> >> +case "${host}" in
> >> +  *-*-netbsd*)
> >> +    DEFAULTDEBUGDIR=/usr/libdata/debug
> >
> > Wouldn't it be better to make this ${prefix}/libdata/debug?
> >
>
> Not really, as this path specifies the userland debug files only. In
> third party we don't use separate debug files. The default prefix is
> /usr/local and without specifying --prefix=/usr debug files won't work.
>
> This path is already hardcoded in LLDB for this OS.

Oh, I see -- you're saying that GDB will usually be configured with as
/usr/local prefix, but is still expected to find system debug data in
/usr/libdata/debug. Makes sense.

Christian

> >> +    ;;
> >> +  *)
> >> +    DEFAULTDEBUGDIR=${libdir}/debug
> >> +    ;;
> >> +esac
> >> +
> >>
> >>
> >>  # Check whether --with-separate-debug-dir was given.
> >> @@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
> >>    withval=$with_separate_debug_dir;
> >>      DEBUGDIR=$withval
> >>  else
> >> -  DEBUGDIR=${libdir}/debug
> >> +  DEBUGDIR=${DEFAULTDEBUGDIR}
> >>  fi
> >>
> >>
> >> diff --git a/gdb/configure.ac b/gdb/configure.ac
> >> index b9dbe13232a..3cef95fbcb8 100644
> >> --- a/gdb/configure.ac
> >> +++ b/gdb/configure.ac
> >> @@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
> >>  fi
> >>  AC_SUBST(MAKEINFO_EXTRA_FLAGS)
> >>
> >> +case "${host}" in
> >> +  *-*-netbsd*)
> >> +    DEFAULTDEBUGDIR=/usr/libdata/debug
> >> +    ;;
> >> +  *)
> >> +    DEFAULTDEBUGDIR=${libdir}/debug
> >> +    ;;
> >> +esac
> >> +
> >>  GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
> >>      [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
> >> -    [${libdir}/debug])
> >> +    [${DEFAULTDEBUGDIR}])
> >>
> >>  # We can't pass paths as command line arguments.
> >>  # Mingw32 tries to be clever and will convert the paths for us.
> >> --
> >> 2.25.0
> >>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-08 17:15 [PATCH] Tune default DEBUGDIR for NetBSD Kamil Rytarowski
  2020-04-08 17:18 ` Christian Biesinger
@ 2020-04-17 14:54 ` Kamil Rytarowski
  2020-04-20 10:32   ` Kamil Rytarowski
  1 sibling, 1 reply; 8+ messages in thread
From: Kamil Rytarowski @ 2020-04-17 14:54 UTC (permalink / raw)
  To: gdb-patches


[-- Attachment #1.1: Type: text/plain, Size: 2406 bytes --]

Ping?

On 08.04.2020 19:15, Kamil Rytarowski wrote:
> NetBSD uses a custom debug file directory /usr/libdata/debug
> for the basesystem and does not use separate debug files in
> pkgsrc (3rd party package collections).
> 
> gdb/ChangeLog:
> 
>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>         * configure: Regenerate.
> ---
>  gdb/ChangeLog    |  5 +++++
>  gdb/configure    | 11 ++++++++++-
>  gdb/configure.ac | 11 ++++++++++-
>  3 files changed, 25 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 7ea85799211..af6844b6ace 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
> +
> +	* configure.ac: Handle NetBSD specific DEBUGDIR.
> +	* configure: Regenerate.
> +
>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
> 
>  	* dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
> diff --git a/gdb/configure b/gdb/configure
> index afafc2c8d18..636a3f69f00 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>  fi
> 
> 
> +case "${host}" in
> +  *-*-netbsd*)
> +    DEFAULTDEBUGDIR=/usr/libdata/debug
> +    ;;
> +  *)
> +    DEFAULTDEBUGDIR=${libdir}/debug
> +    ;;
> +esac
> +
> 
> 
>  # Check whether --with-separate-debug-dir was given.
> @@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
>    withval=$with_separate_debug_dir;
>      DEBUGDIR=$withval
>  else
> -  DEBUGDIR=${libdir}/debug
> +  DEBUGDIR=${DEFAULTDEBUGDIR}
>  fi
> 
> 
> diff --git a/gdb/configure.ac b/gdb/configure.ac
> index b9dbe13232a..3cef95fbcb8 100644
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>  fi
>  AC_SUBST(MAKEINFO_EXTRA_FLAGS)
> 
> +case "${host}" in
> +  *-*-netbsd*)
> +    DEFAULTDEBUGDIR=/usr/libdata/debug
> +    ;;
> +  *)
> +    DEFAULTDEBUGDIR=${libdir}/debug
> +    ;;
> +esac
> +
>  GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
>      [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
> -    [${libdir}/debug])
> +    [${DEFAULTDEBUGDIR}])
> 
>  # We can't pass paths as command line arguments.
>  # Mingw32 tries to be clever and will convert the paths for us.
> --
> 2.25.0
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-17 14:54 ` Kamil Rytarowski
@ 2020-04-20 10:32   ` Kamil Rytarowski
  0 siblings, 0 replies; 8+ messages in thread
From: Kamil Rytarowski @ 2020-04-20 10:32 UTC (permalink / raw)
  To: gdb-patches


[-- Attachment #1.1: Type: text/plain, Size: 2545 bytes --]

Ping?

On 17.04.2020 16:54, Kamil Rytarowski wrote:
> Ping?
> 
> On 08.04.2020 19:15, Kamil Rytarowski wrote:
>> NetBSD uses a custom debug file directory /usr/libdata/debug
>> for the basesystem and does not use separate debug files in
>> pkgsrc (3rd party package collections).
>>
>> gdb/ChangeLog:
>>
>>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>>         * configure: Regenerate.
>> ---
>>  gdb/ChangeLog    |  5 +++++
>>  gdb/configure    | 11 ++++++++++-
>>  gdb/configure.ac | 11 ++++++++++-
>>  3 files changed, 25 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 7ea85799211..af6844b6ace 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
>> +
>> +	* configure.ac: Handle NetBSD specific DEBUGDIR.
>> +	* configure: Regenerate.
>> +
>>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
>>
>>  	* dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
>> diff --git a/gdb/configure b/gdb/configure
>> index afafc2c8d18..636a3f69f00 100755
>> --- a/gdb/configure
>> +++ b/gdb/configure
>> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>  fi
>>
>>
>> +case "${host}" in
>> +  *-*-netbsd*)
>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>> +    ;;
>> +  *)
>> +    DEFAULTDEBUGDIR=${libdir}/debug
>> +    ;;
>> +esac
>> +
>>
>>
>>  # Check whether --with-separate-debug-dir was given.
>> @@ -6423,7 +6432,7 @@ if test "${with_separate_debug_dir+set}" = set; then :
>>    withval=$with_separate_debug_dir;
>>      DEBUGDIR=$withval
>>  else
>> -  DEBUGDIR=${libdir}/debug
>> +  DEBUGDIR=${DEFAULTDEBUGDIR}
>>  fi
>>
>>
>> diff --git a/gdb/configure.ac b/gdb/configure.ac
>> index b9dbe13232a..3cef95fbcb8 100644
>> --- a/gdb/configure.ac
>> +++ b/gdb/configure.ac
>> @@ -93,9 +93,18 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>  fi
>>  AC_SUBST(MAKEINFO_EXTRA_FLAGS)
>>
>> +case "${host}" in
>> +  *-*-netbsd*)
>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>> +    ;;
>> +  *)
>> +    DEFAULTDEBUGDIR=${libdir}/debug
>> +    ;;
>> +esac
>> +
>>  GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
>>      [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
>> -    [${libdir}/debug])
>> +    [${DEFAULTDEBUGDIR}])
>>
>>  # We can't pass paths as command line arguments.
>>  # Mingw32 tries to be clever and will convert the paths for us.
>> --
>> 2.25.0
>>
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-08 17:28     ` Christian Biesinger
@ 2020-04-24 14:38       ` Simon Marchi
  2020-04-24 15:30         ` Kamil Rytarowski
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Marchi @ 2020-04-24 14:38 UTC (permalink / raw)
  To: Christian Biesinger, Kamil Rytarowski; +Cc: gdb-patches

On 2020-04-08 1:28 p.m., Christian Biesinger via Gdb-patches wrote:
> On Wed, Apr 8, 2020 at 12:21 PM Kamil Rytarowski <n54@gmx.com> wrote:
>>
>> On 08.04.2020 19:18, Christian Biesinger wrote:
>>> On Wed, Apr 8, 2020 at 12:16 PM Kamil Rytarowski <n54@gmx.com> wrote:
>>>>
>>>> NetBSD uses a custom debug file directory /usr/libdata/debug
>>>> for the basesystem and does not use separate debug files in
>>>> pkgsrc (3rd party package collections).
>>>>
>>>> gdb/ChangeLog:
>>>>
>>>>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>>>>         * configure: Regenerate.
>>>> ---
>>>>  gdb/ChangeLog    |  5 +++++
>>>>  gdb/configure    | 11 ++++++++++-
>>>>  gdb/configure.ac | 11 ++++++++++-
>>>>  3 files changed, 25 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>>>> index 7ea85799211..af6844b6ace 100644
>>>> --- a/gdb/ChangeLog
>>>> +++ b/gdb/ChangeLog
>>>> @@ -1,3 +1,8 @@
>>>> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
>>>> +
>>>> +       * configure.ac: Handle NetBSD specific DEBUGDIR.
>>>> +       * configure: Regenerate.
>>>> +
>>>>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
>>>>
>>>>         * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
>>>> diff --git a/gdb/configure b/gdb/configure
>>>> index afafc2c8d18..636a3f69f00 100755
>>>> --- a/gdb/configure
>>>> +++ b/gdb/configure
>>>> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>>>  fi
>>>>
>>>>
>>>> +case "${host}" in
>>>> +  *-*-netbsd*)
>>>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>>>
>>> Wouldn't it be better to make this ${prefix}/libdata/debug?
>>>
>>
>> Not really, as this path specifies the userland debug files only. In
>> third party we don't use separate debug files. The default prefix is
>> /usr/local and without specifying --prefix=/usr debug files won't work.
>>
>> This path is already hardcoded in LLDB for this OS.
> 
> Oh, I see -- you're saying that GDB will usually be configured with as
> /usr/local prefix, but is still expected to find system debug data in
> /usr/libdata/debug. Makes sense.

I'm not terribly opposed to the hard-coded path, but I'm more concerned that
we will have different behaviors for NetBSD and Linux, when we face pretty
much the same situation.  On Linux, if you build GDB by hand, you end up
with /usr/local/lib/debug as the debugdir, when 99.9% of the time you actually
want /usr/lib/debug.  I've been bitten by this in the past, before I learned
about that, and I think users constantly get bitten by it.

So, for the moment, could you consider making it ${prefix}/libdata/debug, and
stick --with-separate-debug-dir=/usr/libdata/debug in your pkgsrc?

We can then discuss more broadly about making the default value /usr/lib/debug
on Linux and /usr/libdata/debug on NetBSD, keeping both behaviors in sync.

Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Tune default DEBUGDIR for NetBSD
  2020-04-24 14:38       ` Simon Marchi
@ 2020-04-24 15:30         ` Kamil Rytarowski
  0 siblings, 0 replies; 8+ messages in thread
From: Kamil Rytarowski @ 2020-04-24 15:30 UTC (permalink / raw)
  To: Simon Marchi, Christian Biesinger; +Cc: gdb-patches


[-- Attachment #1.1: Type: text/plain, Size: 3200 bytes --]

On 24.04.2020 16:38, Simon Marchi wrote:
> On 2020-04-08 1:28 p.m., Christian Biesinger via Gdb-patches wrote:
>> On Wed, Apr 8, 2020 at 12:21 PM Kamil Rytarowski <n54@gmx.com> wrote:
>>>
>>> On 08.04.2020 19:18, Christian Biesinger wrote:
>>>> On Wed, Apr 8, 2020 at 12:16 PM Kamil Rytarowski <n54@gmx.com> wrote:
>>>>>
>>>>> NetBSD uses a custom debug file directory /usr/libdata/debug
>>>>> for the basesystem and does not use separate debug files in
>>>>> pkgsrc (3rd party package collections).
>>>>>
>>>>> gdb/ChangeLog:
>>>>>
>>>>>         * configure.ac: Handle NetBSD specific DEBUGDIR.
>>>>>         * configure: Regenerate.
>>>>> ---
>>>>>  gdb/ChangeLog    |  5 +++++
>>>>>  gdb/configure    | 11 ++++++++++-
>>>>>  gdb/configure.ac | 11 ++++++++++-
>>>>>  3 files changed, 25 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>>>>> index 7ea85799211..af6844b6ace 100644
>>>>> --- a/gdb/ChangeLog
>>>>> +++ b/gdb/ChangeLog
>>>>> @@ -1,3 +1,8 @@
>>>>> +2020-04-08  Kamil Rytarowski  <n54@gmx.com>
>>>>> +
>>>>> +       * configure.ac: Handle NetBSD specific DEBUGDIR.
>>>>> +       * configure: Regenerate.
>>>>> +
>>>>>  2020-04-08  Simon Marchi  <simon.marchi@polymtl.ca>
>>>>>
>>>>>         * dwarf2/read.c (read_gdb_index_from_buffer): Remove objfile
>>>>> diff --git a/gdb/configure b/gdb/configure
>>>>> index afafc2c8d18..636a3f69f00 100755
>>>>> --- a/gdb/configure
>>>>> +++ b/gdb/configure
>>>>> @@ -6416,6 +6416,15 @@ if test x"$gdb_cv_have_makeinfo_click" = xyes; then
>>>>>  fi
>>>>>
>>>>>
>>>>> +case "${host}" in
>>>>> +  *-*-netbsd*)
>>>>> +    DEFAULTDEBUGDIR=/usr/libdata/debug
>>>>
>>>> Wouldn't it be better to make this ${prefix}/libdata/debug?
>>>>
>>>
>>> Not really, as this path specifies the userland debug files only. In
>>> third party we don't use separate debug files. The default prefix is
>>> /usr/local and without specifying --prefix=/usr debug files won't work.
>>>
>>> This path is already hardcoded in LLDB for this OS.
>>
>> Oh, I see -- you're saying that GDB will usually be configured with as
>> /usr/local prefix, but is still expected to find system debug data in
>> /usr/libdata/debug. Makes sense.
> 
> I'm not terribly opposed to the hard-coded path, but I'm more concerned that
> we will have different behaviors for NetBSD and Linux, when we face pretty
> much the same situation.  On Linux, if you build GDB by hand, you end up
> with /usr/local/lib/debug as the debugdir, when 99.9% of the time you actually
> want /usr/lib/debug.  I've been bitten by this in the past, before I learned
> about that, and I think users constantly get bitten by it.
> 
> So, for the moment, could you consider making it ${prefix}/libdata/debug, and
> stick --with-separate-debug-dir=/usr/libdata/debug in your pkgsrc?
> 
> We can then discuss more broadly about making the default value /usr/lib/debug
> on Linux and /usr/libdata/debug on NetBSD, keeping both behaviors in sync.
> 
> Simon
> 

I will abandon this patch. Keeping it as a dynamic tunable is good
enough (but not necessarily convenient for users building GDB from the
sources).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-24 15:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 17:15 [PATCH] Tune default DEBUGDIR for NetBSD Kamil Rytarowski
2020-04-08 17:18 ` Christian Biesinger
2020-04-08 17:20   ` Kamil Rytarowski
2020-04-08 17:28     ` Christian Biesinger
2020-04-24 14:38       ` Simon Marchi
2020-04-24 15:30         ` Kamil Rytarowski
2020-04-17 14:54 ` Kamil Rytarowski
2020-04-20 10:32   ` Kamil Rytarowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).