[m-rev.] [m-users.] Debugger, setting initial breakpoint not triggering

Julien Fischer jfischer at opturion.com
Tue Dec 20 00:30:59 AEDT 2022


On Mon, 19 Dec 2022, Zoltan Somogyi wrote:

>
> 2022-12-17 20:57 GMT+11:00 "Zoltan Somogyi" <zoltan.somogyi at runbox.com>:
>> To reduce the chance of confusion, we should rename this configure
>> option to either --enable-hlc-TARGET-level-debug-grades or
>> --enable-hlc-gdb-grades, or something similar. The latter is
>> more expressive, and should get the point across better, even though
>> gdb is not the only debugger for C. We could mention that fact
>> in the one-line help message for that option.
>
> The attached diff does this. Does anyone have an opinion on
> renaming the .ll_debug grade component, and on whether
> it can be done without temporary backwards compatibility?
> I think it can be done, but I am open to being persuaded otherwise.

There's no need to preserve backward compatibility in this case.
(The .ll_debug grades are not part of a standard install.)

> diff --git a/configure.ac b/configure.ac
> index 8e8c2c175..d8fa0847c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3458,10 +3458,10 @@ AC_ARG_ENABLE(hlc-prof-grades,
>                    [install profiling versions of the high level C grade]),
>      [enable_hlc_prof_grades="$enableval"],[enable_hlc_prof_grades=no])
> 
> -AC_ARG_ENABLE(hlc-low-level-debug-grades,
> -    AS_HELP_STRING([--enable-hlc-low-level-debug-grades],
> -                  [install a low-level debugging version of the high level C grade]),
> -    [enable_hlc_ll_debug_grades="$enableval"],[enable_hlc_ll_debug_grades=no])
> +AC_ARG_ENABLE(hlc-gdb-grades,
> +    AS_HELP_STRING([--enable-hlc-gdb-grades],
> +                  [install a gdb-debuggable version of the high level C grade]),
> +    [enable_hlc_gdb_grades="$enableval"],[enable_hlc_gdb_grades=no])

Putting gdb in there suggests you have to use gdb.  I have certainly
debugged Mercury generated C compiled with clang using lldb in the past.
That said, I can't think of a better name for the option and the new one
will at least prevent confusion.

>  AC_ARG_ENABLE(rbmm-grades,
>      AS_HELP_STRING([--enable-rbmm-grades],
> @@ -3513,7 +3513,7 @@ if test "$enable_most_grades" = no; then
>      enable_mmos_grades=no
>      enable_dmm_grades=no
>      enable_hlc_prof_grades=no
> -    enable_hlc_ll_debug_grades=no
> +    enable_hlc_gdb_grades=no
>      enable_rbmm_grades=no
>      enable_par_grades=no
>      enable_stseg_grades=no
> @@ -3689,8 +3689,12 @@ if test "$enable_debug_grades" = yes; then
>      fi
>  fi
> 
> -# Add low-level debug grades.
> -if test "$enable_hlc_ll_debug_grades" = yes; then
> +# Add grades that support debugging using gdb.
> +if test "$enable_hlc_gdb_grades" = yes; then
> +    # XXX We should rename the ".ll_debug" grade component,
> +    # possibly to ".gdb_debug". We could add this is a synonym at first,
> +    # and then stop accepting ".ll_debug", but we could just straight up
> +    # do a non-bootstrapped replacement.
>      LIBGRADES="$LIBGRADES hlc.gcd.ll_debug"

Could we just do .ll_debug -> .c_debug?  Or is the latter still to close
the names of the Mercury debugging grade components?

Julien.


More information about the reviews mailing list