Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: m.mueller99@kay-mueller.de
Cc: m.mueller99@kay-mueller.de, gdb-patches@sources.redhat.com
Subject: Re: [RFC]: patch 1 for Sun C compiled target programs
Date: Sat, 10 Jul 2004 21:06:00 -0000	[thread overview]
Message-ID: <200407102105.i6AL5xJr013149@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <40D6DDFF.7030800@kay-mueller.de> (message from Michael Mueller on Mon, 21 Jun 2004 15:09:19 +0200)

   Date: Mon, 21 Jun 2004 15:09:19 +0200
   From: Michael Mueller <m.mueller99@kay-mueller.de>

   > 
   > I'll try to get this fixed before the 6.2 release.  Thanks for giving
   > me a bit more ammunition for getting this change accepted by the rest
   > of the crowd.

   Sounds promising. I filed PR gdb/1682 to remind you guys :-)

Can you test the attached patch for me?  I don't have access to a
machine with a Sun compiler.  This patch should fix your problems
while keeping the current behaviour with GCC.

Thanks,

Mark


Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.69
diff -u -p -r1.69 dbxread.c
--- dbxread.c 1 Jul 2004 20:25:53 -0000 1.69
+++ dbxread.c 10 Jul 2004 20:58:09 -0000
@@ -2659,6 +2659,7 @@ process_one_symbol (int type, int desc, 
   /* This holds the address of the start of a function, without the system
      peculiarities of function_start_offset.  */
   static CORE_ADDR last_function_start;
+  static int last_function_desc;
 
   /* If this is nonzero, we've seen an N_SLINE since the start of the
      current function.  We use this to tell us to move the first sline
@@ -2736,6 +2737,7 @@ process_one_symbol (int type, int desc, 
       valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
       valu = SMASH_TEXT_ADDRESS (valu);
       last_function_start = valu;
+      last_function_desc = desc;
 
       goto define_a_symbol;
 
@@ -2928,11 +2930,12 @@ process_one_symbol (int type, int desc, 
       /* Relocate for dynamic loading and for ELF acc fn-relative syms.  */
       valu += function_start_offset;
 
-      /* If this is the first SLINE note in the function, record it at
-	 the start of the function instead of at the listed location.  */
       if (within_function && sline_found_in_function == 0)
 	{
-	  record_line (current_subfile, desc, last_function_start);
+	  if (last_function_desc != 0)
+	    record_line (current_subfile, desc, last_function_start);
+	  else
+	    record_line (current_subfile, desc, valu);
 	  sline_found_in_function = 1;
 	}
       else


  reply	other threads:[~2004-07-10 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-16 17:58 Michael Mueller
2004-06-18 21:47 ` Mark Kettenis
2004-06-18 23:27   ` Daniel Jacobowitz
2004-06-21 13:09   ` Michael Mueller
2004-07-10 21:06     ` Mark Kettenis [this message]
2004-07-12 10:25       ` Michael Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200407102105.i6AL5xJr013149@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=m.mueller99@kay-mueller.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox