public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Meaning of "Builds libada directory"
@ 2004-10-06 18:58 Duncan Sands
  2004-10-06 19:02 ` Daniel Jacobowitz
  0 siblings, 1 reply; 13+ messages in thread
From: Duncan Sands @ 2004-10-06 18:58 UTC (permalink / raw)
  To: gdb

$ ./configure --help | grep -i ada
  --enable-libada        Builds libada directory

There does not seem to be a libada directory in the
gdb sources, so what does this mean?  I came across
this while trying to work out what I need to turn on
in order to get Ada support in gdb (latest CVS).  In
fact gdb seems to know about Ada, but for some reason
Ada is not chosen when debugging Ada programs: I just
get

Current language:  auto; currently minimal

...

All the best,

Duncan.

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

* Re: Meaning of "Builds libada directory"
  2004-10-06 18:58 Meaning of "Builds libada directory" Duncan Sands
@ 2004-10-06 19:02 ` Daniel Jacobowitz
  2004-10-06 21:26   ` Duncan Sands
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2004-10-06 19:02 UTC (permalink / raw)
  To: Duncan Sands; +Cc: gdb

On Wed, Oct 06, 2004 at 08:55:46PM +0200, Duncan Sands wrote:
> $ ./configure --help | grep -i ada
>   --enable-libada        Builds libada directory
> 
> There does not seem to be a libada directory in the
> gdb sources, so what does this mean?  I came across

The script is shared with GCC; that option is only relevant to GCC.

-- 
Daniel Jacobowitz

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

* Re: Meaning of "Builds libada directory"
  2004-10-06 19:02 ` Daniel Jacobowitz
@ 2004-10-06 21:26   ` Duncan Sands
  0 siblings, 0 replies; 13+ messages in thread
From: Duncan Sands @ 2004-10-06 21:26 UTC (permalink / raw)
  To: gdb

On Wednesday 06 October 2004 20:58, Daniel Jacobowitz wrote:
> On Wed, Oct 06, 2004 at 08:55:46PM +0200, Duncan Sands wrote:
> > $ ./configure --help | grep -i ada
> >   --enable-libada        Builds libada directory
> > 
> > There does not seem to be a libada directory in the
> > gdb sources, so what does this mean?  I came across
> 
> The script is shared with GCC; that option is only relevant to GCC.

OK, that explains it - thanks.

All the best,

Duncan.

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

* Re: Meaning of "Builds libada directory"
  2004-10-13 20:26           ` Duncan Sands
@ 2004-10-13 20:33             ` Joel Brobecker
  0 siblings, 0 replies; 13+ messages in thread
From: Joel Brobecker @ 2004-10-13 20:33 UTC (permalink / raw)
  To: Duncan Sands; +Cc: Hilfinger, gdb

> > 2004-10-07  Joel Brobecker  <brobecker@gnat.com>
> > 
> >         * dwarf2read.c (set_cu_language): Set language to Ada for
> >         DW_LANG_Ada83 and DW_LANG_Ada95.
> > 
> > It is almost obvious, but I want to test it before I submit this
> > patch and I can't do it this morning. Do give it a try.
> 
> Hi Joel, I see that this patch didn't go in yet.  Was there something
> wrong with it?  It seems to work fine here.

No, it just needs to be reviewed. This can take time, sometimes.
As a general rule for myself, I give the maintainers a week before
I start pinging them, they are busy (actually, one maintainer who
was responsible for dwarf-2 decided to step down for lack of time),
and the workaround is obvious (for lang to ada using "set lang ada").

-- 
Joel

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

* Re: Meaning of "Builds libada directory"
  2004-10-07 14:48         ` Joel Brobecker
  2004-10-07 14:55           ` Duncan Sands
@ 2004-10-13 20:26           ` Duncan Sands
  2004-10-13 20:33             ` Joel Brobecker
  1 sibling, 1 reply; 13+ messages in thread
From: Duncan Sands @ 2004-10-13 20:26 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Hilfinger, gdb

On Thursday 07 October 2004 16:28, Joel Brobecker wrote:
> > > Hmm.  Haven't seen this, but then I don't use that compiler.  I
> > > shall inquire.  Just out of curiosity, if you stop somewhere in Ada
> > > source, what language do you see?
> > 
> > minimal:
> 
> I think I know why. I am a bit in a rush this morning, so I'll
> let you try the attached patch, see if it makes a difference.
> The key here is that 3.15p uses stabs, while recent GCC versions
> use dwarf2, where the language is set from the DW_LANG value,
> rather than the source extension.
> 
> 2004-10-07  Joel Brobecker  <brobecker@gnat.com>
> 
>         * dwarf2read.c (set_cu_language): Set language to Ada for
>         DW_LANG_Ada83 and DW_LANG_Ada95.
> 
> It is almost obvious, but I want to test it before I submit this
> patch and I can't do it this morning. Do give it a try.

Hi Joel, I see that this patch didn't go in yet.  Was there something
wrong with it?  It seems to work fine here.

All the best,

Duncan.

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

* Re: Meaning of "Builds libada directory"
  2004-10-07 14:48         ` Joel Brobecker
@ 2004-10-07 14:55           ` Duncan Sands
  2004-10-13 20:26           ` Duncan Sands
  1 sibling, 0 replies; 13+ messages in thread
From: Duncan Sands @ 2004-10-07 14:55 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Hilfinger, gdb

On Thursday 07 October 2004 16:28, Joel Brobecker wrote:
> > > Hmm.  Haven't seen this, but then I don't use that compiler.  I
> > > shall inquire.  Just out of curiosity, if you stop somewhere in Ada
> > > source, what language do you see?
> > 
> > minimal:
> 
> I think I know why. I am a bit in a rush this morning, so I'll
> let you try the attached patch, see if it makes a difference.
> The key here is that 3.15p uses stabs, while recent GCC versions
> use dwarf2, where the language is set from the DW_LANG value,
> rather than the source extension.
> 
> 2004-10-07  Joel Brobecker  <brobecker@gnat.com>
> 
>         * dwarf2read.c (set_cu_language): Set language to Ada for
>         DW_LANG_Ada83 and DW_LANG_Ada95.
> 
> It is almost obvious, but I want to test it before I submit this
> patch and I can't do it this morning. Do give it a try.

It did the trick - thanks a lot!

All the best,

Duncan.

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:50       ` Duncan Sands
@ 2004-10-07 14:48         ` Joel Brobecker
  2004-10-07 14:55           ` Duncan Sands
  2004-10-13 20:26           ` Duncan Sands
  0 siblings, 2 replies; 13+ messages in thread
From: Joel Brobecker @ 2004-10-07 14:48 UTC (permalink / raw)
  To: Duncan Sands; +Cc: Hilfinger, gdb

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

> > Hmm.  Haven't seen this, but then I don't use that compiler.  I
> > shall inquire.  Just out of curiosity, if you stop somewhere in Ada
> > source, what language do you see?
> 
> minimal:

I think I know why. I am a bit in a rush this morning, so I'll
let you try the attached patch, see if it makes a difference.
The key here is that 3.15p uses stabs, while recent GCC versions
use dwarf2, where the language is set from the DW_LANG value,
rather than the source extension.

2004-10-07  Joel Brobecker  <brobecker@gnat.com>

        * dwarf2read.c (set_cu_language): Set language to Ada for
        DW_LANG_Ada83 and DW_LANG_Ada95.

It is almost obvious, but I want to test it before I submit this
patch and I can't do it this morning. Do give it a try.

-- 
Joel

[-- Attachment #2: dwarf2read.c.diff --]
[-- Type: text/plain, Size: 540 bytes --]

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.163
diff -u -p -r1.163 dwarf2read.c
--- dwarf2read.c	21 Sep 2004 15:04:41 -0000	1.163
+++ dwarf2read.c	7 Oct 2004 14:24:29 -0000
@@ -5932,6 +5932,8 @@ set_cu_language (unsigned int lang, stru
       break;
     case DW_LANG_Ada83:
     case DW_LANG_Ada95:
+      cu->language = language_ada;
+      break;
     case DW_LANG_Cobol74:
     case DW_LANG_Cobol85:
     case DW_LANG_Pascal83:

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:49     ` Paul N. Hilfinger
  2004-10-07  6:50       ` Duncan Sands
@ 2004-10-07  7:08       ` Duncan Sands
  1 sibling, 0 replies; 13+ messages in thread
From: Duncan Sands @ 2004-10-07  7:08 UTC (permalink / raw)
  To: Hilfinger; +Cc: gdb, brobecker

> > Here's a data point: if I compile using gnat 3.15p, then CVS gdb correctly
> > sets the language to Ada.  If I compile using gcc from CVS (pre-ssa tag),
> > then it sets the language to minimal.

I also tried with current CVS gcc - same problem.

D.

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:49     ` Paul N. Hilfinger
@ 2004-10-07  6:50       ` Duncan Sands
  2004-10-07 14:48         ` Joel Brobecker
  2004-10-07  7:08       ` Duncan Sands
  1 sibling, 1 reply; 13+ messages in thread
From: Duncan Sands @ 2004-10-07  6:50 UTC (permalink / raw)
  To: Hilfinger; +Cc: gdb, brobecker

On Thursday 07 October 2004 08:42, Paul N. Hilfinger wrote:
> 
> > Here's a data point: if I compile using gnat 3.15p, then CVS gdb correctly
> > sets the language to Ada.  If I compile using gcc from CVS (pre-ssa tag),
> > then it sets the language to minimal.
> > 
> 
> Hmm.  Haven't seen this, but then I don't use that compiler.  I shall inquire.
> Just out of curiosity, if you stop somewhere in Ada source, what language
> do you see?

minimal:

$ gdb ./x
GNU gdb 6.2.50_2004-10-06-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) break x.adb:5
Breakpoint 1 at 0x8049d02: file x.adb, line 5.
(gdb) run
Starting program: /home/duncan/tmp/x

Breakpoint 1, _ada_x () at x.adb:5
5          L : constant Float := 1.0;
Current language:  auto; currently minimal
(gdb)

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:42   ` Duncan Sands
@ 2004-10-07  6:49     ` Paul N. Hilfinger
  2004-10-07  6:50       ` Duncan Sands
  2004-10-07  7:08       ` Duncan Sands
  0 siblings, 2 replies; 13+ messages in thread
From: Paul N. Hilfinger @ 2004-10-07  6:49 UTC (permalink / raw)
  To: duncan.sands; +Cc: gdb, brobecker



> Here's a data point: if I compile using gnat 3.15p, then CVS gdb correctly
> sets the language to Ada.  If I compile using gcc from CVS (pre-ssa tag),
> then it sets the language to minimal.
> 

Hmm.  Haven't seen this, but then I don't use that compiler.  I shall inquire.
Just out of curiosity, if you stop somewhere in Ada source, what language
do you see?

Paul Hilfinger

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:28 ` Paul N. Hilfinger
  2004-10-07  6:32   ` Duncan Sands
@ 2004-10-07  6:42   ` Duncan Sands
  2004-10-07  6:49     ` Paul N. Hilfinger
  1 sibling, 1 reply; 13+ messages in thread
From: Duncan Sands @ 2004-10-07  6:42 UTC (permalink / raw)
  To: Hilfinger; +Cc: gdb

> What GDB version are you using?  Initial Ada support was turned on only 
> recently in the public tree.

Here's a data point: if I compile using gnat 3.15p, then CVS gdb correctly
sets the language to Ada.  If I compile using gcc from CVS (pre-ssa tag),
then it sets the language to minimal.

All the best,

Duncan.

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

* Re: Meaning of "Builds libada directory"
  2004-10-07  6:28 ` Paul N. Hilfinger
@ 2004-10-07  6:32   ` Duncan Sands
  2004-10-07  6:42   ` Duncan Sands
  1 sibling, 0 replies; 13+ messages in thread
From: Duncan Sands @ 2004-10-07  6:32 UTC (permalink / raw)
  To: Hilfinger; +Cc: gdb

On Thursday 07 October 2004 06:48, Paul N. Hilfinger wrote:
> 
> > In
> > fact gdb seems to know about Ada, but for some reason
> > Ada is not chosen when debugging Ada programs: I just
> > get
> 
> > Current language:  auto; currently minimal
> 
> > ...
> 
> What GDB version are you using?  Initial Ada support was turned on only 
> recently in the public tree.

CVS from yesterday.

D.

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

* Re: Meaning of "Builds libada directory"
       [not found] <200410061940.i96JeCLF003487@tully.CS.Berkeley.EDU>
@ 2004-10-07  6:28 ` Paul N. Hilfinger
  2004-10-07  6:32   ` Duncan Sands
  2004-10-07  6:42   ` Duncan Sands
  0 siblings, 2 replies; 13+ messages in thread
From: Paul N. Hilfinger @ 2004-10-07  6:28 UTC (permalink / raw)
  To: gdb; +Cc: Duncan Sands


> In
> fact gdb seems to know about Ada, but for some reason
> Ada is not chosen when debugging Ada programs: I just
> get

> Current language:  auto; currently minimal

> ...

What GDB version are you using?  Initial Ada support was turned on only 
recently in the public tree.

Paul Hilfinger

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

end of thread, other threads:[~2004-10-13 15:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-06 18:58 Meaning of "Builds libada directory" Duncan Sands
2004-10-06 19:02 ` Daniel Jacobowitz
2004-10-06 21:26   ` Duncan Sands
     [not found] <200410061940.i96JeCLF003487@tully.CS.Berkeley.EDU>
2004-10-07  6:28 ` Paul N. Hilfinger
2004-10-07  6:32   ` Duncan Sands
2004-10-07  6:42   ` Duncan Sands
2004-10-07  6:49     ` Paul N. Hilfinger
2004-10-07  6:50       ` Duncan Sands
2004-10-07 14:48         ` Joel Brobecker
2004-10-07 14:55           ` Duncan Sands
2004-10-13 20:26           ` Duncan Sands
2004-10-13 20:33             ` Joel Brobecker
2004-10-07  7:08       ` Duncan Sands

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