* [RFA/DWARF2] Fallback unknown language to C
@ 2003-03-12 1:44 Joel Brobecker
2003-03-12 14:59 ` Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2003-03-12 1:44 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
I am hearing the first rumors of 5.4, I think it would be nice to have
the following change in. It's a followup on a remark made in this
message:
http://sources.redhat.com/ml/gdb/2003-02/msg00533.html
(GDB does not work very well when the language is unknown)
2003-03-11 J. Brobecker <brobecker@gnat.com>
* dwarf2read.c (set_cu_language): Fall the language back to C
if it is unsupported.
Ok to commit?
Thanks,
--
Joel
[-- Attachment #2: dwarf2read.c.diff --]
[-- Type: text/plain, Size: 809 bytes --]
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.88
diff -c -3 -p -r1.88 dwarf2read.c
*** dwarf2read.c 25 Feb 2003 21:36:17 -0000 1.88
--- dwarf2read.c 12 Mar 2003 01:43:27 -0000
*************** set_cu_language (unsigned int lang)
*** 4455,4461 ****
case DW_LANG_Pascal83:
case DW_LANG_Modula2:
default:
! cu_language = language_unknown;
break;
}
cu_language_defn = language_def (cu_language);
--- 4455,4462 ----
case DW_LANG_Pascal83:
case DW_LANG_Modula2:
default:
! /* These languages are unsupported, so we treat them as C. */
! cu_language = language_c;
break;
}
cu_language_defn = language_def (cu_language);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-03-12 1:44 [RFA/DWARF2] Fallback unknown language to C Joel Brobecker
@ 2003-03-12 14:59 ` Daniel Jacobowitz
2003-04-07 13:24 ` Elena Zannoni
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-03-12 14:59 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Tue, Mar 11, 2003 at 05:44:15PM -0800, Joel Brobecker wrote:
> I am hearing the first rumors of 5.4, I think it would be nice to have
> the following change in. It's a followup on a remark made in this
> message:
>
> http://sources.redhat.com/ml/gdb/2003-02/msg00533.html
>
> (GDB does not work very well when the language is unknown)
>
> 2003-03-11 J. Brobecker <brobecker@gnat.com>
>
> * dwarf2read.c (set_cu_language): Fall the language back to C
> if it is unsupported.
>
> Ok to commit?
I agree with the remark, but not the method. Does anyone see an
advantage to the unk_* methods calling error() instead of silently
defaulting to the C versions? That seems more appropriate to me.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-07 13:24 ` Elena Zannoni
@ 2003-04-04 22:25 ` Daniel Jacobowitz
2003-04-10 18:05 ` Elena Zannoni
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Jacobowitz @ 2003-04-04 22:25 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Joel Brobecker, gdb-patches
On Fri, Apr 04, 2003 at 05:22:11PM -0500, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
> > On Tue, Mar 11, 2003 at 05:44:15PM -0800, Joel Brobecker wrote:
> > > I am hearing the first rumors of 5.4, I think it would be nice to have
> > > the following change in. It's a followup on a remark made in this
> > > message:
> > >
> > > http://sources.redhat.com/ml/gdb/2003-02/msg00533.html
> > >
> > > (GDB does not work very well when the language is unknown)
> > >
> > > 2003-03-11 J. Brobecker <brobecker@gnat.com>
> > >
> > > * dwarf2read.c (set_cu_language): Fall the language back to C
> > > if it is unsupported.
> > >
> > > Ok to commit?
> >
> > I agree with the remark, but not the method. Does anyone see an
> > advantage to the unk_* methods calling error() instead of silently
> > defaulting to the C versions? That seems more appropriate to me.
> >
> >
>
> I don't like too much the idea of making the unk_lang functions
> default silently to C. These functions, in my mind, also serve as a
> kind of error checking in case the language settings get screwed up
> during debugging. Maybe the solution is to provide a
> 'partial_language' set of functions which do the bare minimum.
>
> The thing I missed from the various postings was a real reason of why
> the behavior changed. I guess that for stabs we didn't detect any of
> these languages at all and we defaulted to C from
> set_initial_language().
Yeah, I think that's what was happening. If you prefer Joel's method
I certainly don't object.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-03-12 14:59 ` Daniel Jacobowitz
@ 2003-04-07 13:24 ` Elena Zannoni
2003-04-04 22:25 ` Daniel Jacobowitz
0 siblings, 1 reply; 10+ messages in thread
From: Elena Zannoni @ 2003-04-07 13:24 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Joel Brobecker, gdb-patches
Daniel Jacobowitz writes:
> On Tue, Mar 11, 2003 at 05:44:15PM -0800, Joel Brobecker wrote:
> > I am hearing the first rumors of 5.4, I think it would be nice to have
> > the following change in. It's a followup on a remark made in this
> > message:
> >
> > http://sources.redhat.com/ml/gdb/2003-02/msg00533.html
> >
> > (GDB does not work very well when the language is unknown)
> >
> > 2003-03-11 J. Brobecker <brobecker@gnat.com>
> >
> > * dwarf2read.c (set_cu_language): Fall the language back to C
> > if it is unsupported.
> >
> > Ok to commit?
>
> I agree with the remark, but not the method. Does anyone see an
> advantage to the unk_* methods calling error() instead of silently
> defaulting to the C versions? That seems more appropriate to me.
>
>
I don't like too much the idea of making the unk_lang functions
default silently to C. These functions, in my mind, also serve as a
kind of error checking in case the language settings get screwed up
during debugging. Maybe the solution is to provide a
'partial_language' set of functions which do the bare minimum.
The thing I missed from the various postings was a real reason of why
the behavior changed. I guess that for stabs we didn't detect any of
these languages at all and we defaulted to C from
set_initial_language().
elena
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-04 22:25 ` Daniel Jacobowitz
@ 2003-04-10 18:05 ` Elena Zannoni
2003-04-10 19:08 ` Joel Brobecker
2003-04-23 0:04 ` Joel Brobecker
0 siblings, 2 replies; 10+ messages in thread
From: Elena Zannoni @ 2003-04-10 18:05 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Elena Zannoni, Joel Brobecker, gdb-patches
Daniel Jacobowitz writes:
> On Fri, Apr 04, 2003 at 05:22:11PM -0500, Elena Zannoni wrote:
> > Daniel Jacobowitz writes:
> > > On Tue, Mar 11, 2003 at 05:44:15PM -0800, Joel Brobecker wrote:
> > > > I am hearing the first rumors of 5.4, I think it would be nice to have
> > > > the following change in. It's a followup on a remark made in this
> > > > message:
> > > >
> > > > http://sources.redhat.com/ml/gdb/2003-02/msg00533.html
> > > >
> > > > (GDB does not work very well when the language is unknown)
> > > >
> > > > 2003-03-11 J. Brobecker <brobecker@gnat.com>
> > > >
> > > > * dwarf2read.c (set_cu_language): Fall the language back to C
> > > > if it is unsupported.
> > > >
> > > > Ok to commit?
> > >
> > > I agree with the remark, but not the method. Does anyone see an
> > > advantage to the unk_* methods calling error() instead of silently
> > > defaulting to the C versions? That seems more appropriate to me.
> > >
> > >
> >
> > I don't like too much the idea of making the unk_lang functions
> > default silently to C. These functions, in my mind, also serve as a
> > kind of error checking in case the language settings get screwed up
> > during debugging. Maybe the solution is to provide a
> > 'partial_language' set of functions which do the bare minimum.
> >
> > The thing I missed from the various postings was a real reason of why
> > the behavior changed. I guess that for stabs we didn't detect any of
> > these languages at all and we defaulted to C from
> > set_initial_language().
>
> Yeah, I think that's what was happening. If you prefer Joel's method
> I certainly don't object.
>
I would prefer to have the partial language support. Joel, any chance
you could be bribed into doing it? I think all it would be needed is
to create a new language vector and copy/rename some of the
c-functions into it.
elena
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-10 18:05 ` Elena Zannoni
@ 2003-04-10 19:08 ` Joel Brobecker
2003-04-10 19:48 ` Elena Zannoni
2003-04-23 0:04 ` Joel Brobecker
1 sibling, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2003-04-10 19:08 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches
> I would prefer to have the partial language support. Joel, any chance
> you could be bribed into doing it?
I like being bribed. I see you are a GDB/MI maintainer, can we
make a deal? :-)
> I think all it would be needed is to create a new language vector and
> copy/rename some of the c-functions into it.
That'd be a nice week-end project, but I'm not sure I'd be able to do
that this week-end. Can I promise it for, say, before the 5.4 branch
is cut?
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-10 19:08 ` Joel Brobecker
@ 2003-04-10 19:48 ` Elena Zannoni
2003-04-10 20:00 ` Joel Brobecker
0 siblings, 1 reply; 10+ messages in thread
From: Elena Zannoni @ 2003-04-10 19:48 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Elena Zannoni, Daniel Jacobowitz, gdb-patches
Joel Brobecker writes:
> > I would prefer to have the partial language support. Joel, any chance
> > you could be bribed into doing it?
>
> I like being bribed. I see you are a GDB/MI maintainer, can we
> make a deal? :-)
>
Sure, I probably forgot to review something? I am going through my
mailbox these days, and hopefully catch up.
> > I think all it would be needed is to create a new language vector and
> > copy/rename some of the c-functions into it.
>
> That'd be a nice week-end project, but I'm not sure I'd be able to do
> that this week-end. Can I promise it for, say, before the 5.4 branch
> is cut?
>
sure
elena
> --
> Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-10 19:48 ` Elena Zannoni
@ 2003-04-10 20:00 ` Joel Brobecker
0 siblings, 0 replies; 10+ messages in thread
From: Joel Brobecker @ 2003-04-10 20:00 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches
> > I like being bribed. I see you are a GDB/MI maintainer, can we
> > make a deal? :-)
> >
>
> Sure, I probably forgot to review something? I am going through my
> mailbox these days, and hopefully catch up.
Oh, don't worry about it, there is one new MI command that I'd like to
have some feedback on, but I was in fact only teasing you. I realized a
bit later that it may have been a misplaced teasing, but the message was
already sent by then.
> > That'd be a nice week-end project, but I'm not sure I'd be able to do
> > that this week-end. Can I promise it for, say, before the 5.4 branch
> > is cut?
> >
>
> sure
Deal!
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-10 18:05 ` Elena Zannoni
2003-04-10 19:08 ` Joel Brobecker
@ 2003-04-23 0:04 ` Joel Brobecker
2003-04-23 0:52 ` Elena Zannoni
1 sibling, 1 reply; 10+ messages in thread
From: Joel Brobecker @ 2003-04-23 0:04 UTC (permalink / raw)
To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches
Elena,
> I would prefer to have the partial language support. Joel, any chance
> you could be bribed into doing it? I think all it would be needed is
> to create a new language vector and copy/rename some of the
> c-functions into it.
I had a quicky look and I think it should be pretty simple. However, I
am not sure this is what you had in mind. Here is what I think might
work:
- Add a new language in defs.h (``language_partial''?)
- in c-lang.c: Create a new language vector. It seems that making this
vector close to identical to the C or Asm language vector should be
good enough.
Once this is done and integrated, we can then update dwarf2read.c to
set the language to partial instead of unknown.
Does it correspond to what you were thinking?
--
Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFA/DWARF2] Fallback unknown language to C
2003-04-23 0:04 ` Joel Brobecker
@ 2003-04-23 0:52 ` Elena Zannoni
0 siblings, 0 replies; 10+ messages in thread
From: Elena Zannoni @ 2003-04-23 0:52 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Elena Zannoni, Daniel Jacobowitz, gdb-patches
Joel Brobecker writes:
> Elena,
>
> > I would prefer to have the partial language support. Joel, any chance
> > you could be bribed into doing it? I think all it would be needed is
> > to create a new language vector and copy/rename some of the
> > c-functions into it.
>
> I had a quicky look and I think it should be pretty simple. However, I
> am not sure this is what you had in mind. Here is what I think might
> work:
>
> - Add a new language in defs.h (``language_partial''?)
> - in c-lang.c: Create a new language vector. It seems that making this
> vector close to identical to the C or Asm language vector should be
> good enough.
>
> Once this is done and integrated, we can then update dwarf2read.c to
> set the language to partial instead of unknown.
>
> Does it correspond to what you were thinking?
Yes, perfect!
elena
> --
> Joel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-04-23 0:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-12 1:44 [RFA/DWARF2] Fallback unknown language to C Joel Brobecker
2003-03-12 14:59 ` Daniel Jacobowitz
2003-04-07 13:24 ` Elena Zannoni
2003-04-04 22:25 ` Daniel Jacobowitz
2003-04-10 18:05 ` Elena Zannoni
2003-04-10 19:08 ` Joel Brobecker
2003-04-10 19:48 ` Elena Zannoni
2003-04-10 20:00 ` Joel Brobecker
2003-04-23 0:04 ` Joel Brobecker
2003-04-23 0:52 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox