public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB and MacOS 11.4/BigSur
@ 2021-06-26 18:40 Sam Warner
  2021-06-26 23:08 ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-26 18:40 UTC (permalink / raw)
  To: gdb

Anything I can do to aid in transitioning this bug form “UNCONFIRMED” to “CONFIRMED”?  

https://sourceware.org/bugzilla/show_bug.cgi?id=28010 <https://sourceware.org/bugzilla/show_bug.cgi?id=28010>
Seems the bug is sitting in the unconfirmed state.  On a side, someone emailed me content on how to setup code-signing for GDB.  This prompted me to add that the binary is properly signed (install on OS-X requires this weird need).

Sam



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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-26 18:40 GDB and MacOS 11.4/BigSur Sam Warner
@ 2021-06-26 23:08 ` Simon Marchi
  2021-06-26 23:27   ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Marchi @ 2021-06-26 23:08 UTC (permalink / raw)
  To: Sam Warner, gdb

On 2021-06-26 2:40 p.m., Sam Warner via Gdb wrote:> Anything I can do to aid in transitioning this bug form “UNCONFIRMED” to “CONFIRMED”?  
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=28010 <https://sourceware.org/bugzilla/show_bug.cgi?id=28010>
> Seems the bug is sitting in the unconfirmed state.  On a side, someone emailed me content on how to setup code-signing for GDB.  This prompted me to add that the binary is properly signed (install on OS-X requires this weird need).
> 
> Sam
> 
> 
Hi Sam,

The status of the bug in Bugzilla does not matter much, the important
thing is that the bug is open (thanks for that).

However, the reality is that there is nobody right now really
contributing / fixing bugs for macOS.  I've seen a bit of action on
Bugzilla related to macOS, but in order to get things fixed, somebody
needs to get patches in a good state and send them to the gdb-patches
list for review.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-26 23:08 ` Simon Marchi
@ 2021-06-26 23:27   ` Sam Warner
  2021-06-27  0:51     ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-26 23:27 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi Simon,
  :), perfect, how can I help?

   

Sam

from phone

On Jun 26, 2021, at 4:08 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:

On 2021-06-26 2:40 p.m., Sam Warner via Gdb wrote:> Anything I can do to aid in transitioning this bug form “UNCONFIRMED” to “CONFIRMED”?  
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=28010 <https://sourceware.org/bugzilla/show_bug.cgi?id=28010>
> Seems the bug is sitting in the unconfirmed state.  On a side, someone emailed me content on how to setup code-signing for GDB.  This prompted me to add that the binary is properly signed (install on OS-X requires this weird need).
> 
> Sam
> 
> 
Hi Sam,

The status of the bug in Bugzilla does not matter much, the important
thing is that the bug is open (thanks for that).

However, the reality is that there is nobody right now really
contributing / fixing bugs for macOS.  I've seen a bit of action on
Bugzilla related to macOS, but in order to get things fixed, somebody
needs to get patches in a good state and send them to the gdb-patches
list for review.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-26 23:27   ` Sam Warner
@ 2021-06-27  0:51     ` Simon Marchi
  2021-06-27  4:00       ` Simon Marchi
  2021-06-27 20:32       ` Sam Warner
  0 siblings, 2 replies; 23+ messages in thread
From: Simon Marchi @ 2021-06-27  0:51 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb



On 2021-06-26 7:27 p.m., Sam Warner wrote:
> Hi Simon,
>   :), perfect, how can I help?

Specifically, with the bug you reported, you would need to figure out
why the global current_thread_ is nullptr at the point inferior_thread
is called.  In fact, all this happens before you tried to run anything,
so it's expected that there is no current thread: there are no threads
at all yet.

So, try to get a backtrace so we at least know which inferior_thread
call that is.  You can try to attach a working GDB to the broken GDB
while it's at the "would you like to create a core dump" question.  If
GDB is too broken, you can try lldb, whatever works.

Once we have that, we figure out a solution :).

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-27  0:51     ` Simon Marchi
@ 2021-06-27  4:00       ` Simon Marchi
  2021-06-27 20:32       ` Sam Warner
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Marchi @ 2021-06-27  4:00 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb

On 2021-06-26 8:51 p.m., Simon Marchi via Gdb wrote:> 
> 
> On 2021-06-26 7:27 p.m., Sam Warner wrote:
>> Hi Simon,
>>   :), perfect, how can I help?
> 
> Specifically, with the bug you reported, you would need to figure out
> why the global current_thread_ is nullptr at the point inferior_thread
> is called.  In fact, all this happens before you tried to run anything,
> so it's expected that there is no current thread: there are no threads
> at all yet.
> 
> So, try to get a backtrace so we at least know which inferior_thread
> call that is.  You can try to attach a working GDB to the broken GDB
> while it's at the "would you like to create a core dump" question.  If
> GDB is too broken, you can try lldb, whatever works.
> 
> Once we have that, we figure out a solution :).

Hi Sam,

I had a bit of time, so I took a quick look and wrote a patch:

  https://sourceware.org/pipermail/gdb-patches/2021-June/180396.html

This problem doesn't seem too complicated, but note that I won't always
be able to look into macOS-related problems, especially if they are more
difficult to fix than this one and require more platform-specific
knowledge.  I don't own a Mac myself, I just have access to a relatively
slow VM that is a bit painful to use.  So it would still be really
awesome if we had someone to turn to for macOS-related problems.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-27  0:51     ` Simon Marchi
  2021-06-27  4:00       ` Simon Marchi
@ 2021-06-27 20:32       ` Sam Warner
  2021-06-27 22:27         ` Simon Marchi
  1 sibling, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-27 20:32 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi Simon,
   Yeh, I’ve queued to do the actions for the first paragraph based on your input that few are working on resolving issues for GDB/MacOS.

    When you mentioned " to get patches in a good state and send them to the gdb-patches
list for review.” I thought, well, first order of business would be this (as I saw an individual had an attempt in 10.1 to fix a null-pointer).  Should I first help here?

Sam



> On Jun 26, 2021, at 5:51 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> 
> 
> On 2021-06-26 7:27 p.m., Sam Warner wrote:
>> Hi Simon,
>>  :), perfect, how can I help?
> 
> Specifically, with the bug you reported, you would need to figure out
> why the global current_thread_ is nullptr at the point inferior_thread
> is called.  In fact, all this happens before you tried to run anything,
> so it's expected that there is no current thread: there are no threads
> at all yet.
> 
> So, try to get a backtrace so we at least know which inferior_thread
> call that is.  You can try to attach a working GDB to the broken GDB
> while it's at the "would you like to create a core dump" question.  If
> GDB is too broken, you can try lldb, whatever works.
> 
> Once we have that, we figure out a solution :).
> 
> Simon


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-27 20:32       ` Sam Warner
@ 2021-06-27 22:27         ` Simon Marchi
  2021-06-27 22:44           ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Marchi @ 2021-06-27 22:27 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb



On 2021-06-27 4:32 p.m., Sam Warner wrote:
> Hi Simon,
>    Yeh, I’ve queued to do the actions for the first paragraph based on your input that few are working on resolving issues for GDB/MacOS.
> 
>     When you mentioned " to get patches in a good state and send them to the gdb-patches
> list for review.” I thought, well, first order of business would be this (as I saw an individual had an attempt in 10.1 to fix a null-pointer).  Should I first help here?

Well, for the issue you reported specifically, please see the patch I
sent here, I think it fixes it:

    https://sourceware.org/pipermail/gdb-patches/2021-June/180396.html

But there were other bugs reported on Bugzilla for macOS, they might
affect you as well.  If you stumble on one of them, you could try to
write a fix for it and send a patch to the gdb-patches list, so that it
gets reviewed and eventually merged.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-27 22:27         ` Simon Marchi
@ 2021-06-27 22:44           ` Sam Warner
  2021-06-28  0:48             ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-27 22:44 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi Simon,

   Thanks - yes - I’ll start with that patch first.  I obtain the same call stack

   My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.

Sam


Thread 2 hit Breakpoint 1, 0x00000001007cbcac in internal_error(char const*, int, char const*, ...) ()
(gdb) backtrace
#0  0x00000001007cbcac in internal_error(char const*, int, char const*, ...) ()
#1  0x0000000100397902 in inferior_thread() ()
#2  0x00000001002bdd41 in get_current_regcache() ()
#3  0x000000010033bc59 in darwin_solib_create_inferior_hook(int) ()
#4  0x000000010036555c in symbol_file_command(char const*, int) ()
#5  0x0000000100159047 in file_command(char const*, int) ()
#6  0x00000001000b4ec1 in cmd_func(cmd_list_element*, char const*, int) ()
#7  0x00000001003a0ce9 in execute_command(char const*, int) ()
#8  0x0000000100156348 in command_handler(char const*) ()
#9  0x000000010015661e in command_line_handler(std::__1::unique_ptr<char, gdb::xfree_deleter<char> >&&) ()
#10 0x0000000100155e1a in gdb_rl_callback_handler(char*) ()
#11 0x000000010040ec94 in rl_callback_read_char ()
#12 0x0000000100156d1d in gdb_rl_callback_read_char_wrapper_noexcept() ()
#13 0x0000000100155b1c in gdb_rl_callback_read_char_wrapper(void*) ()
#14 0x000000010015623f in stdin_event_handler(int, void*) ()
#15 0x00000001007cc257 in gdb_wait_for_event(int) ()
#16 0x00000001007cbe37 in gdb_do_one_event() ()
#17 0x00000001001fe000 in captured_command_loop() ()
#18 0x00000001001fd0e5 in gdb_main(captured_main_args*) ()
#19 0x000000010000266c in main ()
(gdb) 


> On Jun 27, 2021, at 3:27 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> Well, for the issue you reported specifically, please see the patch I
> sent here, I think it fixes it:
> 
>    https://sourceware.org/pipermail/gdb-patches/2021-June/180396.html
> 
> But there were other bugs reported on Bugzilla for macOS, they might
> affect you as well.  If you stumble on one of them, you could try to
> write a fix for it and send a patch to the gdb-patches list, so that it
> gets reviewed and eventually merged.

> Simon
> 
> On 2021-06-27 4:32 p.m., Sam Warner wrote:
>> Hi Simon,
>>   Yeh, I’ve queued to do the actions for the first paragraph based on your input that few are working on resolving issues for GDB/MacOS.
>> 
>>    When you mentioned " to get patches in a good state and send them to the gdb-patches
>> list for review.” I thought, well, first order of business would be this (as I saw an individual had an attempt in 10.1 to fix a null-pointer).  Should I first help here?
> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-27 22:44           ` Sam Warner
@ 2021-06-28  0:48             ` Simon Marchi
  2021-06-28 18:10               ` Sam Warner
  2021-06-28 21:51               ` Sam Warner
  0 siblings, 2 replies; 23+ messages in thread
From: Simon Marchi @ 2021-06-28  0:48 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb

On 2021-06-27 6:44 p.m., Sam Warner wrote:
> Hi Simon,
> 
>    Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
> 
>    My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.

I don't know what symbol-server is, I can't help you with that.

To build gdb, you normally just need to run these commands at the
top-level:

  ./configure
  make all-gdb

The built gdb will be at gdb/gdb.  But there are some additional quirks
on macOS though, so it's not as simple as that.  GDB requires libgmp, so
you need to install that.  You need GNU make to build (the make that
comes with macOS is not GNU make).  You can install those using Macports
(or Brew, I guess) or by building them by hand.  You can then probably
get by using the commands:

  ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
  gmake

Update /opt/local to point where your libgmp is installed.  gmake refers
to GNU make, when installed through Macports.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-28  0:48             ` Simon Marchi
@ 2021-06-28 18:10               ` Sam Warner
  2021-06-28 21:51               ` Sam Warner
  1 sibling, 0 replies; 23+ messages in thread
From: Sam Warner @ 2021-06-28 18:10 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi, - some good news Gdb 9.2 doesn’t have this issue. 

   I’ll go confirm Eclipse/CDT works with GDB 9.2 for a quick check, and then back to setting up the build-environment for 10.2 (and testing the fix you have).  Just want to aid others with an interim solution for Eclipse/CDT.

Sam

sam@eclipsec bin % gdb gdb
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin19.4.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gdb...
(No debugging symbols found in gdb)
(gdb) file /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Release/Eclipse.HelloWorld.MacOS.Gcc
Reading symbols from /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Release/Eclipse.HelloWorld.MacOS.Gcc...
(No debugging symbols found in /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Release/Eclipse.HelloWorld.MacOS.Gcc)
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
BFD: /usr/lib/dyld(i386:x86-64): unknown load command 0x34
(gdb) run
Starting program: /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Release/Eclipse.HelloWorld.MacOS.Gcc 
[New Thread 0x2703 of process 25537]

> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>> Hi Simon,
>> 
>>   Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>> 
>>   My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
> 
> I don't know what symbol-server is, I can't help you with that.
> 
> To build gdb, you normally just need to run these commands at the
> top-level:
> 
>  ./configure
>  make all-gdb
> 
> The built gdb will be at gdb/gdb.  But there are some additional quirks
> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
> you need to install that.  You need GNU make to build (the make that
> comes with macOS is not GNU make).  You can install those using Macports
> (or Brew, I guess) or by building them by hand.  You can then probably
> get by using the commands:
> 
>  ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>  gmake
> 
> Update /opt/local to point where your libgmp is installed.  gmake refers
> to GNU make, when installed through Macports.
> 
> Simon


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-28  0:48             ` Simon Marchi
  2021-06-28 18:10               ` Sam Warner
@ 2021-06-28 21:51               ` Sam Warner
  2021-06-29  0:03                 ` Sam Warner
  1 sibling, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-28 21:51 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi,
  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
  (Using gcc-11 from home-brew)

Sam


> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>> Hi Simon,
>> 
>>   Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>> 
>>   My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
> 
> I don't know what symbol-server is, I can't help you with that.
> 
> To build gdb, you normally just need to run these commands at the
> top-level:
> 
>  ./configure
>  make all-gdb
> 
> The built gdb will be at gdb/gdb.  But there are some additional quirks
> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
> you need to install that.  You need GNU make to build (the make that
> comes with macOS is not GNU make).  You can install those using Macports
> (or Brew, I guess) or by building them by hand.  You can then probably
> get by using the commands:
> 
>  ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>  gmake
> 
> Update /opt/local to point where your libgmp is installed.  gmake refers
> to GNU make, when installed through Macports.
> 
> Simon


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-28 21:51               ` Sam Warner
@ 2021-06-29  0:03                 ` Sam Warner
  2021-06-29  0:29                   ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29  0:03 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Never mind - found it - https://sourceware.org/gdb/wiki/Internals%20Testsuite <https://sourceware.org/gdb/wiki/Internals%20Testsuite> 

> On Jun 28, 2021, at 2:51 PM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Hi,
>  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
>  (Using gcc-11 from home-brew)
> 
> Sam
> 
> 
>> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
>> 
>> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>>> Hi Simon,
>>> 
>>>  Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>>> 
>>>  My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
>> 
>> I don't know what symbol-server is, I can't help you with that.
>> 
>> To build gdb, you normally just need to run these commands at the
>> top-level:
>> 
>> ./configure
>> make all-gdb
>> 
>> The built gdb will be at gdb/gdb.  But there are some additional quirks
>> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
>> you need to install that.  You need GNU make to build (the make that
>> comes with macOS is not GNU make).  You can install those using Macports
>> (or Brew, I guess) or by building them by hand.  You can then probably
>> get by using the commands:
>> 
>> ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>> gmake
>> 
>> Update /opt/local to point where your libgmp is installed.  gmake refers
>> to GNU make, when installed through Macports.
>> 
>> Simon
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29  0:03                 ` Sam Warner
@ 2021-06-29  0:29                   ` Sam Warner
  2021-06-29  1:34                     ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29  0:29 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi,
   I need a bit of help to speed things along.

   On macOS, zsh installs an SDK, which apparently is partially needed - yet - it produces build errors.  (Attached build.log, and config.with.szh.SDKs.log)
   Meanwhile, if I temporarily remove the SDK of zsh, then ‘./configure’ fails. (Attached config.without.szh.SDKs.log)

  I was about to start setting up LD and INCLUDE environment variables, yet I think this is already handled by “./configure"

   I’m a bit lost.  Any suggestions?

Sam



> On Jun 28, 2021, at 5:03 PM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Never mind - found it - https://sourceware.org/gdb/wiki/Internals%20Testsuite <https://sourceware.org/gdb/wiki/Internals%20Testsuite> 
> 
>> On Jun 28, 2021, at 2:51 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>> 
>> Hi,
>>  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
>>  (Using gcc-11 from home-brew)
>> 
>> Sam
>> 
>> 
>>> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca <mailto:simon.marchi@polymtl.ca>> wrote:
>>> 
>>> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>>>> Hi Simon,
>>>> 
>>>>  Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>>>> 
>>>>  My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
>>> 
>>> I don't know what symbol-server is, I can't help you with that.
>>> 
>>> To build gdb, you normally just need to run these commands at the
>>> top-level:
>>> 
>>> ./configure
>>> make all-gdb
>>> 
>>> The built gdb will be at gdb/gdb.  But there are some additional quirks
>>> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
>>> you need to install that.  You need GNU make to build (the make that
>>> comes with macOS is not GNU make).  You can install those using Macports
>>> (or Brew, I guess) or by building them by hand.  You can then probably
>>> get by using the commands:
>>> 
>>> ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>>> gmake
>>> 
>>> Update /opt/local to point where your libgmp is installed.  gmake refers
>>> to GNU make, when installed through Macports.
>>> 
>>> Simon
>> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29  0:29                   ` Sam Warner
@ 2021-06-29  1:34                     ` Sam Warner
  2021-06-29  1:44                       ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29  1:34 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi,
  Shoot - my bad -  I wasn’t super careful when I grabbed the source, just pulling the latest HEAD off the git repository rather than the true release set of source.

Sam

 Ps, I did some more reading, and perhaps I skimmed over the second paragraph on BuildingForDarwin <https://sourceware.org/gdb/wiki/BuildingOnDarwin>.  The "To avoid such warnings building 7.0, configure with --disable-intl” line does change the build error.  

   1) make clean,  .configure (only), and make…. Build.withInternationalization.log
   2) make clean,  ".configure --disable-intl”, make … Build.withoutInternationalization.log

  With both still having issues, I reflected back that I wasn’t super careful when I grabbed the source, just pulling the latest HEAD off the git repository, and when I re-obtained the source for 10.2 I was more careful.  The build is still progressing at this moment.  Which is a significantly longer duration than before.



> On Jun 28, 2021, at 5:29 PM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Hi,
>    I need a bit of help to speed things along.
> 
>    On macOS, zsh installs an SDK, which apparently is partially needed - yet - it produces build errors.  (Attached build.log, and config.with.szh.SDKs.log)
>    Meanwhile, if I temporarily remove the SDK of zsh, then ‘./configure’ fails. (Attached config.without.szh.SDKs.log)
> 
>   I was about to start setting up LD and INCLUDE environment variables, yet I think this is already handled by “./configure"
> 
>    I’m a bit lost.  Any suggestions?
> 
> Sam
> <config.without.szh.SDKs.log>
> <config.with.szh.SDKs.log>
> 
> 
>> On Jun 28, 2021, at 5:03 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>> 
>> Never mind - found it - https://sourceware.org/gdb/wiki/Internals%20Testsuite <https://sourceware.org/gdb/wiki/Internals%20Testsuite> 
>> 
>>> On Jun 28, 2021, at 2:51 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>>> 
>>> Hi,
>>>  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
>>>  (Using gcc-11 from home-brew)
>>> 
>>> Sam
>>> 
>>> 
>>>> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca <mailto:simon.marchi@polymtl.ca>> wrote:
>>>> 
>>>> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>>>>> Hi Simon,
>>>>> 
>>>>>  Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>>>>> 
>>>>>  My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
>>>> 
>>>> I don't know what symbol-server is, I can't help you with that.
>>>> 
>>>> To build gdb, you normally just need to run these commands at the
>>>> top-level:
>>>> 
>>>> ./configure
>>>> make all-gdb
>>>> 
>>>> The built gdb will be at gdb/gdb.  But there are some additional quirks
>>>> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
>>>> you need to install that.  You need GNU make to build (the make that
>>>> comes with macOS is not GNU make).  You can install those using Macports
>>>> (or Brew, I guess) or by building them by hand.  You can then probably
>>>> get by using the commands:
>>>> 
>>>> ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>>>> gmake
>>>> 
>>>> Update /opt/local to point where your libgmp is installed.  gmake refers
>>>> to GNU make, when installed through Macports.
>>>> 
>>>> Simon
>>> 
>> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29  1:34                     ` Sam Warner
@ 2021-06-29  1:44                       ` Sam Warner
  2021-06-29 14:04                         ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29  1:44 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi Simon,
   Thank you - the added details you gave me really helped, especially when I both obtained the official 10.2 source set, and followed the BuildingForDarwin <https://sourceware.org/gdb/wiki/BuildingOnDarwin> instructions for  ".configure --disable-intl”.

  I successfully built now, and off to use the test-suites

Sam

> On Jun 28, 2021, at 6:34 PM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Hi,
>   Shoot - my bad -  I wasn’t super careful when I grabbed the source, just pulling the latest HEAD off the git repository rather than the true release set of source.
> 
> Sam
> 
>  Ps, I did some more reading, and perhaps I skimmed over the second paragraph on BuildingForDarwin <https://sourceware.org/gdb/wiki/BuildingOnDarwin>.  The "To avoid such warnings building 7.0, configure with --disable-intl” line does change the build error.  
> 
>    1) make clean,  .configure (only), and make…. Build.withInternationalization.log
>    2) make clean,  ".configure --disable-intl”, make … Build.withoutInternationalization.log
> 
>   With both still having issues, I reflected back that I wasn’t super careful when I grabbed the source, just pulling the latest HEAD off the git repository, and when I re-obtained the source for 10.2 I was more careful.  The build is still progressing at this moment.  Which is a significantly longer duration than before.
> 
> 
> 
>> On Jun 28, 2021, at 5:29 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>> 
>> Hi,
>>    I need a bit of help to speed things along.
>> 
>>    On macOS, zsh installs an SDK, which apparently is partially needed - yet - it produces build errors.  (Attached build.log, and config.with.szh.SDKs.log)
>>    Meanwhile, if I temporarily remove the SDK of zsh, then ‘./configure’ fails. (Attached config.without.szh.SDKs.log)
>> 
>>   I was about to start setting up LD and INCLUDE environment variables, yet I think this is already handled by “./configure"
>> 
>>    I’m a bit lost.  Any suggestions?
>> 
>> Sam
>> <config.without.szh.SDKs.log>
>> <config.with.szh.SDKs.log>
>> 
>> 
>>> On Jun 28, 2021, at 5:03 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>>> 
>>> Never mind - found it - https://sourceware.org/gdb/wiki/Internals%20Testsuite <https://sourceware.org/gdb/wiki/Internals%20Testsuite> 
>>> 
>>>> On Jun 28, 2021, at 2:51 PM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>>>> 
>>>> Hi,
>>>>  One more newbie question.  After building, is there a canned set of tests to make sure what I built matches what’s expected?
>>>>  (Using gcc-11 from home-brew)
>>>> 
>>>> Sam
>>>> 
>>>> 
>>>>> On Jun 27, 2021, at 5:48 PM, Simon Marchi <simon.marchi@polymtl.ca <mailto:simon.marchi@polymtl.ca>> wrote:
>>>>> 
>>>>> On 2021-06-27 6:44 p.m., Sam Warner wrote:
>>>>>> Hi Simon,
>>>>>> 
>>>>>>  Thanks - yes - I’ll start with that patch first.  I obtain the same call stack
>>>>>> 
>>>>>>  My next two things to learn is how to get the equivalent of the symbol-server working, and then to setup a developer-environment for GDB.  Any pointers would be great.
>>>>> 
>>>>> I don't know what symbol-server is, I can't help you with that.
>>>>> 
>>>>> To build gdb, you normally just need to run these commands at the
>>>>> top-level:
>>>>> 
>>>>> ./configure
>>>>> make all-gdb
>>>>> 
>>>>> The built gdb will be at gdb/gdb.  But there are some additional quirks
>>>>> on macOS though, so it's not as simple as that.  GDB requires libgmp, so
>>>>> you need to install that.  You need GNU make to build (the make that
>>>>> comes with macOS is not GNU make).  You can install those using Macports
>>>>> (or Brew, I guess) or by building them by hand.  You can then probably
>>>>> get by using the commands:
>>>>> 
>>>>> ./configure --disable-nls CFLAGS="-g3 -O0" CXXFLAGS="-std=gnu++17 -g3 -O0" --with-libgmp-prefix=/opt/local
>>>>> gmake
>>>>> 
>>>>> Update /opt/local to point where your libgmp is installed.  gmake refers
>>>>> to GNU make, when installed through Macports.
>>>>> 
>>>>> Simon
>>>> 
>>> 
>> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29  1:44                       ` Sam Warner
@ 2021-06-29 14:04                         ` Simon Marchi
  2021-06-29 14:38                           ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Marchi @ 2021-06-29 14:04 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb

On 2021-06-28 9:44 p.m., Sam Warner wrote:
> Hi Simon,
>    Thank you - the added details you gave me really helped, especially when I both obtained the official 10.2 source set, and followed the BuildingForDarwin <https://sourceware.org/gdb/wiki/BuildingOnDarwin> instructions for  ".configure --disable-intl”.

If you intend to make changes that you want integrated upstream, you
should really work using the latest git (and keep it up to date), not
10.2.

That wiki page is really old, it could really use a refresh.

>   I successfully built now, and off to use the test-suites

Glad to hear it.

You can do some manual some tests first, trying to debug a little
program.  If that works, to run the testsuite:

  https://sourceware.org/gdb/wiki/TestingGDB

However, I expect it to be in a really bad shape on macOS (if you can
get it to run at all) and would need quite a lot of effort to run
relatively clean.  But all efforts start with a baby step, so if you can
get at least a small test to run it would be great already.  For
example, getting the gdb.base/template.exp test to run (it's kind of a
"Hello World!" test, serving as an example when writing a test from
scratch.  So you would use:

  $ make check TESTS="gdb.base/template.exp"

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 14:04                         ` Simon Marchi
@ 2021-06-29 14:38                           ` Sam Warner
  2021-06-29 14:43                             ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29 14:38 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Is there a before review checklist?
Seems it would have:
1) use change in the latest source tree, presumably on all supported OSes, and log build
2) use test-suite before, and on all supported OSes, log results
3) fix test on all supported on all supported OSe

Which, for me, the all supported OSes is the big hurdle (in time and logistics). How’s this solved?

For now, I repro’ed the null-pointer issue is in the build I generated, which is good news,  I’ll grab that source fix you supplied and see if it resolves the issue.

Sam



> On Jun 29, 2021, at 7:04 AM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> On 2021-06-28 9:44 p.m., Sam Warner wrote:
>> Hi Simon,
>>   Thank you - the added details you gave me really helped, especially when I both obtained the official 10.2 source set, and followed the BuildingForDarwin <https://sourceware.org/gdb/wiki/BuildingOnDarwin> instructions for  ".configure --disable-intl”.
> 
> If you intend to make changes that you want integrated upstream, you
> should really work using the latest git (and keep it up to date), not
> 10.2.
> 
> That wiki page is really old, it could really use a refresh.
> 
>>  I successfully built now, and off to use the test-suites
> 
> Glad to hear it.
> 
> You can do some manual some tests first, trying to debug a little
> program.  If that works, to run the testsuite:
> 
>  https://sourceware.org/gdb/wiki/TestingGDB
> 
> However, I expect it to be in a really bad shape on macOS (if you can
> get it to run at all) and would need quite a lot of effort to run
> relatively clean.  But all efforts start with a baby step, so if you can
> get at least a small test to run it would be great already.  For
> example, getting the gdb.base/template.exp test to run (it's kind of a
> "Hello World!" test, serving as an example when writing a test from
> scratch.  So you would use:
> 
>  $ make check TESTS="gdb.base/template.exp"
> 
> Simon


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 14:38                           ` Sam Warner
@ 2021-06-29 14:43                             ` Simon Marchi
  2021-06-29 14:45                               ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Marchi @ 2021-06-29 14:43 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb

On 2021-06-29 10:38 a.m., Sam Warner wrote:
> Is there a before review checklist?
> 
>     Seems it would have:
> 
>         1) use change in the latest source tree, presumably on all supported OSes, and log build
> 
>         2) use test-suite before, and on all supported OSes, log results
> 
>         3) fix test on all supported on all supported OSe

You can't possibly test all supported OSes / platforms.  Focus on the
platform you use.  During review, we can evaluate if there are risks of
the change breaking something on other platforms, and if so try to test
on those other platforms.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 14:43                             ` Simon Marchi
@ 2021-06-29 14:45                               ` Sam Warner
  2021-06-29 14:59                                 ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29 14:45 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Any record of the last time the test-suite was run on a version of OS-x?

Sam



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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 14:45                               ` Sam Warner
@ 2021-06-29 14:59                                 ` Sam Warner
  2021-06-29 15:17                                   ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29 14:59 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

http://gdb-buildbot.osci.io/results/ <http://gdb-buildbot.osci.io/results/>

:) found it in the Fedora instructions for running the suite.


> On Jun 29, 2021, at 7:45 AM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> Any record of the last time the test-suite was run on a version of OS-x?
> 
> Sam
> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 14:59                                 ` Sam Warner
@ 2021-06-29 15:17                                   ` Sam Warner
  2021-06-29 15:23                                     ` Simon Marchi
  0 siblings, 1 reply; 23+ messages in thread
From: Sam Warner @ 2021-06-29 15:17 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

:) ok - I’m beginning to see a wider horizon - macOS isn’t on BuildBot.

 Is there some meeting I can come to, or setup, to discuss some of these types of items?

Sam 



> On Jun 29, 2021, at 7:59 AM, Sam Warner <samuel.r.warner@me.com> wrote:
> 
> http://gdb-buildbot.osci.io/results/ <http://gdb-buildbot.osci.io/results/>
> 
> :) found it in the Fedora instructions for running the suite.
> 
> 
>> On Jun 29, 2021, at 7:45 AM, Sam Warner <samuel.r.warner@me.com <mailto:samuel.r.warner@me.com>> wrote:
>> 
>> Any record of the last time the test-suite was run on a version of OS-x?
>> 
>> Sam
>> 
>> 
> 


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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 15:17                                   ` Sam Warner
@ 2021-06-29 15:23                                     ` Simon Marchi
  2021-06-30 21:29                                       ` Sam Warner
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Marchi @ 2021-06-29 15:23 UTC (permalink / raw)
  To: Sam Warner; +Cc: gdb

On 2021-06-29 11:17 a.m., Sam Warner wrote:
> :) ok - I’m beginning to see a wider horizon - macOS isn’t on BuildBot.
> 
>  Is there some meeting I can come to, or setup, to discuss some of these types of items?

No, we don't have such meetings, the mailing list is the right place for
that.  If you want more interactive help / discussions, you can come on
IRC:

  https://sourceware.org/gdb/irc/

Note that the buildbot isn't really working right now.  We would like to
have a working buildbot, but there needs to be some volunteers that take
up this task.

Simon

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

* Re: GDB and MacOS 11.4/BigSur
  2021-06-29 15:23                                     ` Simon Marchi
@ 2021-06-30 21:29                                       ` Sam Warner
  0 siblings, 0 replies; 23+ messages in thread
From: Sam Warner @ 2021-06-30 21:29 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb

Hi,
  I joined the IRC channel - I’ll use that more for the ‘how-to’ questions
  I’ll investigate helping on the buildbot after I get the null-ptr with the ‘file’ command issue resolved.

Sam


> On Jun 29, 2021, at 8:23 AM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
> On 2021-06-29 11:17 a.m., Sam Warner wrote:
>> :) ok - I’m beginning to see a wider horizon - macOS isn’t on BuildBot.
>> 
>> Is there some meeting I can come to, or setup, to discuss some of these types of items?
> 
> No, we don't have such meetings, the mailing list is the right place for
> that.  If you want more interactive help / discussions, you can come on
> IRC:
> 
>  https://sourceware.org/gdb/irc/
> 
> Note that the buildbot isn't really working right now.  We would like to
> have a working buildbot, but there needs to be some volunteers that take
> up this task.
> 
> Simon


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

end of thread, other threads:[~2021-06-30 21:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 18:40 GDB and MacOS 11.4/BigSur Sam Warner
2021-06-26 23:08 ` Simon Marchi
2021-06-26 23:27   ` Sam Warner
2021-06-27  0:51     ` Simon Marchi
2021-06-27  4:00       ` Simon Marchi
2021-06-27 20:32       ` Sam Warner
2021-06-27 22:27         ` Simon Marchi
2021-06-27 22:44           ` Sam Warner
2021-06-28  0:48             ` Simon Marchi
2021-06-28 18:10               ` Sam Warner
2021-06-28 21:51               ` Sam Warner
2021-06-29  0:03                 ` Sam Warner
2021-06-29  0:29                   ` Sam Warner
2021-06-29  1:34                     ` Sam Warner
2021-06-29  1:44                       ` Sam Warner
2021-06-29 14:04                         ` Simon Marchi
2021-06-29 14:38                           ` Sam Warner
2021-06-29 14:43                             ` Simon Marchi
2021-06-29 14:45                               ` Sam Warner
2021-06-29 14:59                                 ` Sam Warner
2021-06-29 15:17                                   ` Sam Warner
2021-06-29 15:23                                     ` Simon Marchi
2021-06-30 21:29                                       ` Sam Warner

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).