Eli Zaretskii | 1 Apr 2007 05:03
Picon

Re: [RFA/libiberty] Enhance FILENAME_CMP for Windows filesystems

> Date: Sat, 31 Mar 2007 18:39:59 -0400
> From: Christopher Faylor <cgf-use-the-mailinglist-please <at> sourceware.org>
> 
> On Sat, Mar 31, 2007 at 02:57:01PM +0300, Eli Zaretskii wrote:
> >While I realize that the original FILENAME_CMP macro did the same, as
> >long as we are trying to do better, wouldn't it be nice if this
> >function also collapsed multiple consecutive slashes or backslashes?
> 
> Joel already acknowledge that this was a possible future improvement.
> 
> If this is done, please be sure to preserve two slashes at the beginning
> of a filename since Windows uses those.

Right, sorry I forgot to mention that.

Andreas Schwab | 1 Apr 2007 20:25
Picon

Use parameter instead of current_gdbarch

Don't use the global current_gdbarch when it's already passed as
parameter.  Checked in as obvious.

Andreas.

2007-04-01  Andreas Schwab  <schwab <at> suse.de>

	* rs6000-tdep.c (rs6000_convert_from_func_ptr_addr): Use parameter
	gdbarch instead of current_gdbarch.

Index: gdb/rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.268
diff -u -a -p -a -u -p -r1.268 gdb/rs6000-tdep.c
--- gdb/rs6000-tdep.c	27 Mar 2007 19:04:37 -0000	1.268
+++ gdb/rs6000-tdep.c	1 Apr 2007 18:01:49 -0000
 <at>  <at>  -2390,7 +2390,7  <at>  <at>  rs6000_convert_from_func_ptr_addr (struc
     return addr;

   /* ADDR is in the data space, so it's a special function pointer. */
-  return read_memory_addr (addr, gdbarch_tdep (current_gdbarch)->wordsize);
+  return read_memory_addr (addr, gdbarch_tdep (gdbarch)->wordsize);
 }

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
(Continue reading)

Andreas Schwab | 1 Apr 2007 22:11
Picon

[PATCH] Fix phantom frames on ppc

On ppc the DWARF2 register 64 is the cr register.  But
rs6000_dwarf2_reg_to_regnum failed to translate that to the gdb internal
cr register number, causing it to be mistaken as the gdb internal pc
register.  This resulted in phantom frames whenever a frame has the cr
register saved.

Andreas.

2007-04-01  Andreas Schwab  <schwab <at> suse.de>

	* rs6000-tdep.c (rs6000_dwarf2_reg_to_regnum): Decode 64 as CR
	register.

--- gdb/rs6000-tdep.c.~1.269.~	2007-04-01 21:23:44.000000000 +0200
+++ gdb/rs6000-tdep.c	2007-04-01 21:24:17.000000000 +0200
 <at>  <at>  -2274,6 +2274,8  <at>  <at>  rs6000_dwarf2_reg_to_regnum (int num)
   else
     switch (num)
       {
+      case 64:
+	return tdep->ppc_cr_regnum;
       case 67:
         return tdep->ppc_vrsave_regnum - 1; /* vscr */
       case 99:

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
(Continue reading)

Andreas Schwab | 1 Apr 2007 22:58
Picon

Re: [RFA/libiberty] Enhance FILENAME_CMP for Windows filesystems

Joel Brobecker <brobecker <at> adacore.com> writes:

> /* File name comparison routine.
>
>    Copyright (C) 2007 Free Software Foundation, Inc.
>
>    This program is free software; you can redistribute it and/or modify
>    it under the terms of the GNU General Public License as published by
>    the Free Software Foundation; either version 2, or (at your option)
>    any later version.
>
>    This program is distributed in the hope that it will be useful,
>    but WITHOUT ANY WARRANTY; without even the implied warranty of
>    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>    GNU General Public License for more details.
>
>    You should have received a copy of the GNU General Public License
>    along with this program; if not, write to the Free Software Foundation,
>    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
>
> #ifdef HAVE_STRING_H
> #include <string.h>
> #endif

That won't work without #include "config.h".

Andreas.

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
(Continue reading)

Joel Brobecker | 2 Apr 2007 08:35
Favicon

Re: [RFA/libiberty] Enhance FILENAME_CMP for Windows filesystems

> > #ifdef HAVE_STRING_H
> > #include <string.h>
> > #endif
> 
> That won't work without #include "config.h".

Ah ha! Ben Elliston wrote me privately that he gets a warning
on x86-linux (Ubunty) that strcmp.h is not defined. That would
probably explain it. Thank you!

Unfortunately, I'm going to be unavailable for the next two of three
days. I'll try to fix it ASAP, but if someone could do this for me,
I would really appreciate it.

--

-- 
Joel

Joel Brobecker | 2 Apr 2007 09:00
Favicon

Re: [RFA] Enhance stabs reader to better deal with forward references

Pedro,

> Unfortunatelly, this patch broke Cygwin, which still uses stabs by default.
> 
> I am getting a SIGSEGV while issuing a breakpoint.

Thanks for the report, and sorry about that. Unfortunately, I won't have
much time in the next two or three days - I might be able to understand
what is actually from the backtrace and your patch, but it might not be
sufficient. And if you have an opportunity to investigate a bit more,
that would be very much appreciated.  In the meantime, feel free to back
the patch out if necessary.

--

-- 
Joel

Joel Brobecker | 2 Apr 2007 09:02
Favicon

Re: [RFA/libiberty] Enhance FILENAME_CMP for Windows filesystems

> Sorry for chiming in only now, but I have a few minor comments:

Not a problem at all, Eli. I am not able to followup on them right
now, but I promise I will in a few days.

> >   for (;;)
> >     {
> >       int c1 = tolower (*s1);
> >       int c2 = tolower (*s2);
> 
> Are we sure that strncasecmp's behavior wrt to locales is identical to
> that of tolower's?  If not, the above will introduce a bug in
> non-English locales.

For this question, I'm not sure, actually.

--

-- 
Joel

Pierre Muller | 2 Apr 2007 10:51
Picon
Picon

RE: [RFA] Enhance stabs reader to better deal with forward references

  I made the same change to my local repository,
due to the same problem, on the same target.

  The problem is that in the CVS tree, end_symtab function
is called from within the read_ofile_symtab function
after current_objfile is reset to nil.
  But due to your change, current_objfile is still 
accessed inside dbx_lookup_type (stabsread.c)
called by cleanup_undefined_types_noname (stabsread.c)
called by cleanup_undefined_types (stabsread.c)
called by end_symtab (buildsym.c).

Hope this helps,

Pierre

-----Message d'origine-----
De : gdb-patches-owner <at> sourceware.org
[mailto:gdb-patches-owner <at> sourceware.org] De la part de Joel Brobecker
Envoyé : Monday, April 02, 2007 9:00 AM
À : Pedro Alves
Cc : gdb-patches <at> sourceware.org
Objet : Re: [RFA] Enhance stabs reader to better deal with forward
references

Pedro,

> Unfortunatelly, this patch broke Cygwin, which still uses stabs by
default.
> 
(Continue reading)

Daniel Jacobowitz | 2 Apr 2007 13:05

Re: [RFA] Enhance stabs reader to better deal with forward references

On Sat, Mar 31, 2007 at 09:41:56PM +0100, Pedro Alves wrote:
> 2007-03-31  Pedro Alves  <pedro_alves <at> portugalmail.pt>
> 
> 	* dbxread.c (read_ofile_symtab): Move current_objfile
> 	clearing to after end_stabs.

This is OK.

--

-- 
Daniel Jacobowitz
CodeSourcery

Andreas Schwab | 2 Apr 2007 13:21
Picon

Re: [RFA/libiberty] Enhance FILENAME_CMP for Windows filesystems

Joel Brobecker <brobecker <at> adacore.com> writes:

>> > #ifdef HAVE_STRING_H
>> > #include <string.h>
>> > #endif
>> 
>> That won't work without #include "config.h".
>
> Ah ha! Ben Elliston wrote me privately that he gets a warning
> on x86-linux (Ubunty) that strcmp.h is not defined. That would
> probably explain it. Thank you!
>
> Unfortunately, I'm going to be unavailable for the next two of three
> days. I'll try to fix it ASAP, but if someone could do this for me,
> I would really appreciate it.

I've checked this in.

Andreas.

2007-04-02  Andreas Schwab  <schwab <at> suse.de>

	* filename_cmp.c: Include "config.h".

--- libiberty/filename_cmp.c.~1.1.~	2007-03-29 23:03:48.000000000 +0200
+++ libiberty/filename_cmp.c	2007-04-01 22:59:02.000000000 +0200
 <at>  <at>  -16,6 +16,10  <at>  <at> 
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */

(Continue reading)


Gmane