public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB 7.5 on OS X 10.7
@ 2012-08-31  4:37 Kaushik Srenevasan
  2012-08-31  9:19 ` Tristan Gingold
  0 siblings, 1 reply; 4+ messages in thread
From: Kaushik Srenevasan @ 2012-08-31  4:37 UTC (permalink / raw)
  To: gdb

Is GDB (7.5) known to work on OS X 10.7? I compiled it from GIT with
all defaults except the prefix but don't seem to be able to get even
the basic commands (bt, break) to work.

  file ~/src/jdk7/build/macosx-x86_64-debug/bin/java
  set args -classpath ~/src/tmp helloworld
  catch load libjvm

Catchpoint 1
  Inferior loaded
/Users/ks/src/jdk7/build/macosx-x86_64-debug/lib/server/libjvm.dylib
0x00007fff5fc0b269 in ?? ()
(gdb) bt
#0  0x00007fff5fc0b269 in ?? ()
#1  0x00007fff5fc0b24d in ?? ()
#2  0x00000001000d1a50 in ?? ()
#3  0x00007fff5fc3b560 in ?? ()
#4  0x00000001000d1f20 in ?? ()
#5  0x00007fff5fc0540e in ?? ()
#6  0x0000000101800000 in ?? ()
#7  0x0000000100200300 in ?? ()
#8  0x0000000050403138 in ?? ()
#9  0x00007fff5fc052ea in ?? ()
#10 0x0000000100200260 in ?? ()
#11 0x00000001000d1ae8 in ?? ()
#12 0x0000000000000000 in ?? ()
(gdb) break LRG::set_mask
Cannot access memory at address 0x141be0

It looks like break was able to find the symbol's address. The address
however looks suspect to me. The target (if that matters) is a debug
build of the OpenJDK.

            --- Kaushik

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

* Re: GDB 7.5 on OS X 10.7
  2012-08-31  4:37 GDB 7.5 on OS X 10.7 Kaushik Srenevasan
@ 2012-08-31  9:19 ` Tristan Gingold
  2012-08-31 13:49   ` Jack Howarth
  0 siblings, 1 reply; 4+ messages in thread
From: Tristan Gingold @ 2012-08-31  9:19 UTC (permalink / raw)
  To: Kaushik Srenevasan; +Cc: gdb


On Aug 31, 2012, at 6:37 AM, Kaushik Srenevasan wrote:

> Is GDB (7.5) known to work on OS X 10.7? I compiled it from GIT with
> all defaults except the prefix but don't seem to be able to get even
> the basic commands (bt, break) to work.

Yes, it is known to work (I use it every days).  However there is still many issues because it is not heavily used.
In particular, I rarely debug dylibs.

Tristan.

> 
>  file ~/src/jdk7/build/macosx-x86_64-debug/bin/java
>  set args -classpath ~/src/tmp helloworld
>  catch load libjvm
> 
> Catchpoint 1
>  Inferior loaded
> /Users/ks/src/jdk7/build/macosx-x86_64-debug/lib/server/libjvm.dylib
> 0x00007fff5fc0b269 in ?? ()
> (gdb) bt
> #0  0x00007fff5fc0b269 in ?? ()
> #1  0x00007fff5fc0b24d in ?? ()
> #2  0x00000001000d1a50 in ?? ()
> #3  0x00007fff5fc3b560 in ?? ()
> #4  0x00000001000d1f20 in ?? ()
> #5  0x00007fff5fc0540e in ?? ()
> #6  0x0000000101800000 in ?? ()
> #7  0x0000000100200300 in ?? ()
> #8  0x0000000050403138 in ?? ()
> #9  0x00007fff5fc052ea in ?? ()
> #10 0x0000000100200260 in ?? ()
> #11 0x00000001000d1ae8 in ?? ()
> #12 0x0000000000000000 in ?? ()
> (gdb) break LRG::set_mask
> Cannot access memory at address 0x141be0
> 
> It looks like break was able to find the symbol's address. The address
> however looks suspect to me. The target (if that matters) is a debug
> build of the OpenJDK.
> 
>            --- Kaushik

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

* Re: GDB 7.5 on OS X 10.7
  2012-08-31  9:19 ` Tristan Gingold
@ 2012-08-31 13:49   ` Jack Howarth
  2012-08-31 14:19     ` Tristan Gingold
  0 siblings, 1 reply; 4+ messages in thread
From: Jack Howarth @ 2012-08-31 13:49 UTC (permalink / raw)
  To: Tristan Gingold; +Cc: Kaushik Srenevasan, gdb

On Fri, Aug 31, 2012 at 11:19:18AM +0200, Tristan Gingold wrote:
> 
> On Aug 31, 2012, at 6:37 AM, Kaushik Srenevasan wrote:
> 
> > Is GDB (7.5) known to work on OS X 10.7? I compiled it from GIT with
> > all defaults except the prefix but don't seem to be able to get even
> > the basic commands (bt, break) to work.
> 
> Yes, it is known to work (I use it every days).  However there is still many issues because it is not heavily used.
> In particular, I rarely debug dylibs.
> 
> Tristan.

Tristan,
   Sorry to hijack the thread, but what is the status of support for gdb 7.5 in 10.8?
It seems that the approach of using...

sudo dscl . append /Groups/_developer GroupMembership howarth

doesn't allow non-root users to access the mach ports any more. Unless I run fsf-gdb
as sudo, I get an error...

Unable to find Mach task port for process-id 24007: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

Also, even as sudo, I do get some non-fatal warnings from gdb 7.5...

% sudo fsf-gdb ./a.out
GNU gdb (GDB) 7.5
Copyright (C) 2012 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-darwin12.2.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
BFD: /Users/howarth/a.out: unknown load command 0x2a
BFD: /Users/howarth/a.out: unknown load command 0x28
BFD: /Users/howarth/a.out: unknown load command 0x2b
BFD: /Users/howarth/a.out: unknown load command 0x2a
BFD: /Users/howarth/a.out: unknown load command 0x28
BFD: /Users/howarth/a.out: unknown load command 0x2b
Reading symbols from /Users/howarth/a.out...Reading symbols from /Users/howarth/a.out.dSYM/Contents/Resources/DWARF/a.out...done.
done.

Are those significant?
            Jack

> 
> > 
> >  file ~/src/jdk7/build/macosx-x86_64-debug/bin/java
> >  set args -classpath ~/src/tmp helloworld
> >  catch load libjvm
> > 
> > Catchpoint 1
> >  Inferior loaded
> > /Users/ks/src/jdk7/build/macosx-x86_64-debug/lib/server/libjvm.dylib
> > 0x00007fff5fc0b269 in ?? ()
> > (gdb) bt
> > #0  0x00007fff5fc0b269 in ?? ()
> > #1  0x00007fff5fc0b24d in ?? ()
> > #2  0x00000001000d1a50 in ?? ()
> > #3  0x00007fff5fc3b560 in ?? ()
> > #4  0x00000001000d1f20 in ?? ()
> > #5  0x00007fff5fc0540e in ?? ()
> > #6  0x0000000101800000 in ?? ()
> > #7  0x0000000100200300 in ?? ()
> > #8  0x0000000050403138 in ?? ()
> > #9  0x00007fff5fc052ea in ?? ()
> > #10 0x0000000100200260 in ?? ()
> > #11 0x00000001000d1ae8 in ?? ()
> > #12 0x0000000000000000 in ?? ()
> > (gdb) break LRG::set_mask
> > Cannot access memory at address 0x141be0
> > 
> > It looks like break was able to find the symbol's address. The address
> > however looks suspect to me. The target (if that matters) is a debug
> > build of the OpenJDK.
> > 
> >            --- Kaushik

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

* Re: GDB 7.5 on OS X 10.7
  2012-08-31 13:49   ` Jack Howarth
@ 2012-08-31 14:19     ` Tristan Gingold
  0 siblings, 0 replies; 4+ messages in thread
From: Tristan Gingold @ 2012-08-31 14:19 UTC (permalink / raw)
  To: Jack Howarth; +Cc: Kaushik Srenevasan, gdb


On Aug 31, 2012, at 3:48 PM, Jack Howarth wrote:

> On Fri, Aug 31, 2012 at 11:19:18AM +0200, Tristan Gingold wrote:
>> 
>> On Aug 31, 2012, at 6:37 AM, Kaushik Srenevasan wrote:
>> 
>>> Is GDB (7.5) known to work on OS X 10.7? I compiled it from GIT with
>>> all defaults except the prefix but don't seem to be able to get even
>>> the basic commands (bt, break) to work.
>> 
>> Yes, it is known to work (I use it every days).  However there is still many issues because it is not heavily used.
>> In particular, I rarely debug dylibs.
>> 
>> Tristan.
> 
> Tristan,
>   Sorry to hijack the thread, but what is the status of support for gdb 7.5 in 10.8?
> It seems that the approach of using...
> 
> sudo dscl . append /Groups/_developer GroupMembership howarth
> 
> doesn't allow non-root users to access the mach ports any more. Unless I run fsf-gdb
> as sudo, I get an error...

Did you try to codesign gdb as explained in http://sourceware.org/gdb/wiki/BuildingOnDarwin ?

> Unable to find Mach task port for process-id 24007: (os/kern) failure (0x5).
> (please check gdb is codesigned - see taskgated(8))
> 
> Also, even as sudo, I do get some non-fatal warnings from gdb 7.5...
> 
> % sudo fsf-gdb ./a.out
> GNU gdb (GDB) 7.5
> Copyright (C) 2012 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-darwin12.2.0".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> BFD: /Users/howarth/a.out: unknown load command 0x2a
> BFD: /Users/howarth/a.out: unknown load command 0x28
> BFD: /Users/howarth/a.out: unknown load command 0x2b
> BFD: /Users/howarth/a.out: unknown load command 0x2a
> BFD: /Users/howarth/a.out: unknown load command 0x28
> BFD: /Users/howarth/a.out: unknown load command 0x2b
> Reading symbols from /Users/howarth/a.out...Reading symbols from /Users/howarth/a.out.dSYM/Contents/Resources/DWARF/a.out...done.

As far as I know, this warnings are not significant.  AFAIK, initial breakpoint doesn't work however.

I haven't yet switched to Mountain Lion, but adapting gdb to 10.8 is becoming urgent here.  So stay tuned.

Tristan.

> done.
> 
> Are those significant?
>            Jack
> 
>> 
>>> 
>>> file ~/src/jdk7/build/macosx-x86_64-debug/bin/java
>>> set args -classpath ~/src/tmp helloworld
>>> catch load libjvm
>>> 
>>> Catchpoint 1
>>> Inferior loaded
>>> /Users/ks/src/jdk7/build/macosx-x86_64-debug/lib/server/libjvm.dylib
>>> 0x00007fff5fc0b269 in ?? ()
>>> (gdb) bt
>>> #0  0x00007fff5fc0b269 in ?? ()
>>> #1  0x00007fff5fc0b24d in ?? ()
>>> #2  0x00000001000d1a50 in ?? ()
>>> #3  0x00007fff5fc3b560 in ?? ()
>>> #4  0x00000001000d1f20 in ?? ()
>>> #5  0x00007fff5fc0540e in ?? ()
>>> #6  0x0000000101800000 in ?? ()
>>> #7  0x0000000100200300 in ?? ()
>>> #8  0x0000000050403138 in ?? ()
>>> #9  0x00007fff5fc052ea in ?? ()
>>> #10 0x0000000100200260 in ?? ()
>>> #11 0x00000001000d1ae8 in ?? ()
>>> #12 0x0000000000000000 in ?? ()
>>> (gdb) break LRG::set_mask
>>> Cannot access memory at address 0x141be0
>>> 
>>> It looks like break was able to find the symbol's address. The address
>>> however looks suspect to me. The target (if that matters) is a debug
>>> build of the OpenJDK.
>>> 
>>>           --- Kaushik

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

end of thread, other threads:[~2012-08-31 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31  4:37 GDB 7.5 on OS X 10.7 Kaushik Srenevasan
2012-08-31  9:19 ` Tristan Gingold
2012-08-31 13:49   ` Jack Howarth
2012-08-31 14:19     ` Tristan Gingold

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