This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA 2nd] hpread.c printf (stderr,... ->fprintf_unfiltered (gdb_stderr,..


At 15:16 24/04/2002 , Pierre Muller a écrit:
>This is a second of the files that I listed in
>http://sources.redhat.com/ml/gdb/2002-02/msg00212.html
>as still having direct uses of stderr.
>
>I did not fix a 80 char overflow, because I didn't find a good way to do it:
>If I try to align the string "Psymtab for %s already read in.  Shouldn't happen.\n"
>with gdb_stderr, I still get an overflow, how show I indent the args then?
>Should I break the string constant?

This is a second version which replaces
[RFA/RFC] printf (stderr,... ->fprintf_unfiltered (gdb_stderr,... in hpread.c
http://sources.redhat.com/ml/gdb-patches/2002-04/msg00930.html

I finally cut the string in two part,
but like for the other patch, I can't compile it to test
the patch :(

In that case I even find the compilation error
rather strange:
$ (cd ../../build/gdb;make hpread.o)
gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config -DHAVE_CONFIG_H -I..
/../src/gdb/../include/opcode -I../../src/gdb/../readline/.. -I../bfd -I../../sr
c/gdb/../bfd  -I../../src/gdb/../include -I../intl -I../../src/gdb/../intl  -DMI
_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wpare
ntheses -Wpointer-arith -Wuninitialized  ../../src/gdb/hpread.c
../../src/gdb/hpread.c:29: syms.h: No such file or directory
make: *** [hpread.o] Error 1

in hpread.c
there is a line with
#include "syms.h"
but there is no syms.h 
in the gdb sources...

If I do a 'grep -n syms.h *.c in gdb directory,
I get only this:
$ grep -n syms.h *.c
hpread.c:29:#include "syms.h"
somread.c:25:#include <syms.h>

Is the hpread.c file obsolete?
Or shouldn't it be also
#include <syms.h>
like in somread.c?

ChangeLog entry unchanged.

>ChangeLog entry:
>
>2002-04-24  Pierre Muller  <ics.u-strasbg.fr>
>         * hpread.c (hpread_psymtab_to_symtab_1,
>         hpread_psymtab_to_symtab): Replace fprintf (stderr,...
>         with fprintf_unfiltered (gdb_stderr,....


Index: hpread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpread.c,v
retrieving revision 1.15
diff -u -p -r1.15 hpread.c
--- hpread.c    15 Apr 2002 04:52:08 -0000      1.15
+++ hpread.c    26 Apr 2002 09:01:32 -0000
@@ -2693,8 +2693,9 @@ hpread_psymtab_to_symtab_1 (struct parti
    /* Complain if we've already read in this symbol table.  */
    if (pst->readin)
      {
-      fprintf (stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
-              pst->filename);
+      fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in."
+                         "  Shouldn't happen.\n",
+                         pst->filename);
        return;
      }

@@ -2748,8 +2749,9 @@ hpread_psymtab_to_symtab (struct partial
    /* Sanity check.  */
    if (pst->readin)
      {
-      fprintf (stderr, "Psymtab for %s already read in.  Shouldn't happen.\n",
-              pst->filename);
+      fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in."
+                         "  Shouldn't happen.\n",
+                         pst->filename);
        return;
      }







Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]