From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25330 invoked by alias); 4 Aug 2004 07:10:09 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25309 invoked from network); 4 Aug 2004 07:10:06 -0000 Received: from unknown (HELO server7.nfra.nl) (192.87.1.57) by sourceware.org with SMTP; 4 Aug 2004 07:10:06 -0000 Received: from juw15.nfra.nl [10.87.8.15] by server7.nfra.nl; Wed, 04 Aug 2004 09:09:41 +0200 Received: from juw15.nfra.nl (localhost [127.0.0.1]) by juw15.nfra.nl (8.12.2+Sun/8.11.1) with ESMTP id i7478iCu014700; Wed, 4 Aug 2004 09:08:44 +0200 (CEST) Received: (from kettenis@localhost) by juw15.nfra.nl (8.12.2+Sun/8.12.2/Submit) id i7478hcN014697; Wed, 4 Aug 2004 09:08:43 +0200 (CEST) Date: Wed, 04 Aug 2004 07:10:00 -0000 Message-Id: <200408040708.i7478hcN014697@juw15.nfra.nl> From: Mark Kettenis To: jmolenda@apple.com CC: gdb@sources.redhat.com In-reply-to: <810EE7BD-E596-11D8-8435-000A9569836A@apple.com> (message from Jason Molenda on Tue, 3 Aug 2004 14:45:58 -0700) Subject: Re: Recording a file's language in the SO stab? (anyone have Sun's compiler handy?) References: <810EE7BD-E596-11D8-8435-000A9569836A@apple.com> X-SW-Source: 2004-08/txt/msg00019.txt.bz2 From: Jason Molenda Date: Tue, 3 Aug 2004 14:45:58 -0700 That's the real design question -- how to decide what numbers correlate to what languages. If anyone has access to the Sun compiler, I'd really like to find out what numbers they issue for C/C++ if they're really doing this. Otherwise I'll be picking numbers at random. Hi Jason, Here are the numbers as given in Sun's Stabs Interface Manual (Version 4.0): N_SO_AS 1 assembler source N_SO_C 2 K & R source N_SO_ANSI_C 3 ANSI C source N_SO_CC 4 C++ source N_SO_FORTRAN 5 Fotrtran source N_SO_PASCAL 6 Pascal source N_SO_FOTRAN90 7 Fotran90 source The manual also says explicitly that if the value is 0, the langauge should be inferred from the extension of the source file. I've already done a quick implementation of this in our gdb and in the FSF top of tree sources - it's not especially complicated. I added a language enum to the partial_symtab structure to record it so it was easy to pick up in set_initial_language() when we only have psymtabs read in. That's probably not necessary to work but it didn't seem like such a bad idea. Can't reallu judge this. Anyway, I wanted to bounce this off the group to see if there are any reactions. We can add this as an Apple Local change in our gcc/gdb but I hate to extend the debug format on our fork if we can avoid it at all. Yes, this seems worthwhile to have. Mark