Hi  Jonathan,
>
>> The src/c++26/debugging.cc file defines a global volatile int which can
>> be set by debuggers to indicate when they are attached and detached from
>> a running process. This allows std::is_debugger_present() to give a
>> reliable answer, and additionally allows a debugger to choose how
>> std::breakpoint() should behave. Setting the global to a positive value
>> will cause std::breakpoint() to use that value as an argument to
>> std::raise, so debuggers that prefer SIGABRT for breakpoints can select
>> that. By default std::breakpoint() will use a platform-specific action
>> such as the INT3 instruction on x86, or GCC's __builtin_trap().
>
> this patch broke Solaris/x86 bootstrap with /bin/as:

it also broke bootstrap on macOS 11, 10.11:

In file included from 
/vol/gcc/src/hg/master/darwin/libstdc++-v3/src/c++26/debugging.cc:36:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/sys/ptrace.h:99:42:
 error: 'caddr_t' has not been declared
   99 | int     ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);
      |                                          ^~~

caddr_t is defined in <sys/types.h>, and ptrace(2) documents

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ptrace.h>

     int
     ptrace(int request, pid_t pid, caddr_t addr, int data);

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to