public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [windows mingw]gdb cvs head build error in windows-nat.c
@ 2011-12-16 14:17 asmwarrior
  2011-12-16 14:30 ` asmwarrior
  2011-12-16 14:30 ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: asmwarrior @ 2011-12-16 14:17 UTC (permalink / raw)
  To: gdb

I build under MSYS+mingw
Here is the build error:


gcc -O0 -g -D__USE_MINGW_ACCESS   -I. -I../../gdb/gdb -I../../gdb/gdb/common -I.
./../gdb/gdb/config -DLOCALEDIR="\"/mingw/share/locale\"" -DHAVE_CONFIG_H -I../.
./gdb/gdb/../include/opcode -I../../gdb/gdb/../opcodes/.. -I../../gdb/gdb/../rea
dline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../libdecn
umber -I../../gdb/gdb/../libdecnumber  -I../../gdb/gdb/gnulib -Ignulib    -IE:/c
ode/python272/include -IE:/code/python272/include -Wall -Wdeclaration-after-stat
ement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused
-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wno-format -Werror -c
  -o dcache.o -MT dcache.o -MMD -MP -MF .deps/dcache.Tpo ../../gdb/gdb/dcache.c
../../gdb/gdb/windows-nat.c: In function 'init_windows_ops':
../../gdb/gdb/windows-nat.c:2517:26: error: 'cygwin_get_dr' undeclared (first us
e in this function)
../../gdb/gdb/windows-nat.c:2517:26: note: each undeclared identifier is reporte
d only once for each function it appears in
../../gdb/gdb/windows-nat.c:2519:29: error: 'cygwin_get_dr7' undeclared (first u
se in this function)
cc1.exe: warnings being treated as errors
../../gdb/gdb/windows-nat.c: At top level:
../../gdb/gdb/windows-nat.c:2654:1: error: 'cygwin_get_dr' defined but not used
../../gdb/gdb/windows-nat.c:2673:1: error: 'cygwin_get_dr7' defined but not used


So, I think it was caused by this:

2011-12-14  Pedro Alves
The change in windows-nat.c

gdb/windows-nat.c |   21 ++++++++++++++++++++-
  1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 20e3c67..97ed237 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2494,8 +2494,9 @@ init_windows_ops (void)

    i386_dr_low.set_control = cygwin_set_dr7;
    i386_dr_low.set_addr = cygwin_set_dr;
-  i386_dr_low.reset_addr = NULL;
+  i386_dr_low.get_addr = cygwin_get_dr;
    i386_dr_low.get_status = cygwin_get_dr6;
+  i386_dr_low.get_control = cygwin_get_dr7;


any ideas?

asmwarrior
ollydbg from codeblocks' forum

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 14:17 [windows mingw]gdb cvs head build error in windows-nat.c asmwarrior
@ 2011-12-16 14:30 ` asmwarrior
  2011-12-16 15:17   ` Pierre Muller
  2011-12-16 14:30 ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: asmwarrior @ 2011-12-16 14:30 UTC (permalink / raw)
  To: gdb

On 2011-12-16 22:21, asmwarrior wrote:
> I build under MSYS+mingw
> Here is the build error:
>
>
> gcc -O0 -g -D__USE_MINGW_ACCESS   -I. -I../../gdb/gdb -I../../gdb/gdb/common -I.
> ../../gdb/gdb/config -DLOCALEDIR="\"/mingw/share/locale\"" -DHAVE_CONFIG_H -I../.
> ../gdb/gdb/../include/opcode -I../../gdb/gdb/../opcodes/.. -I../../gdb/gdb/../rea
> dline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../libdecn
> umber -I../../gdb/gdb/../libdecnumber  -I../../gdb/gdb/gnulib -Ignulib    -IE:/c
> ode/python272/include -IE:/code/python272/include -Wall -Wdeclaration-after-stat
> ement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused
> -value -Wunused-function -Wno-switch -Wno-char-subscripts -Wno-format -Werror -c
>    -o dcache.o -MT dcache.o -MMD -MP -MF .deps/dcache.Tpo ../../gdb/gdb/dcache.c
> .../../gdb/gdb/windows-nat.c: In function 'init_windows_ops':
> .../../gdb/gdb/windows-nat.c:2517:26: error: 'cygwin_get_dr' undeclared (first us
> e in this function)
> .../../gdb/gdb/windows-nat.c:2517:26: note: each undeclared identifier is reporte
> d only once for each function it appears in
> .../../gdb/gdb/windows-nat.c:2519:29: error: 'cygwin_get_dr7' undeclared (first u
> se in this function)
> cc1.exe: warnings being treated as errors
> .../../gdb/gdb/windows-nat.c: At top level:
> .../../gdb/gdb/windows-nat.c:2654:1: error: 'cygwin_get_dr' defined but not used
> .../../gdb/gdb/windows-nat.c:2673:1: error: 'cygwin_get_dr7' defined but not used
>
>
> So, I think it was caused by this:
>
> 2011-12-14  Pedro Alves
> The change in windows-nat.c
>
> gdb/windows-nat.c |   21 ++++++++++++++++++++-
>    1 files changed, 20 insertions(+), 1 deletions(-)
>
> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index 20e3c67..97ed237 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -2494,8 +2494,9 @@ init_windows_ops (void)
>
>      i386_dr_low.set_control = cygwin_set_dr7;
>      i386_dr_low.set_addr = cygwin_set_dr;
> -  i386_dr_low.reset_addr = NULL;
> +  i386_dr_low.get_addr = cygwin_get_dr;
>      i386_dr_low.get_status = cygwin_get_dr6;
> +  i386_dr_low.get_control = cygwin_get_dr7;
>
>
> any ideas?
>
> asmwarrior
> ollydbg from codeblocks' forum
>
>


This patch should fix the build error.

  gdb/windows-nat.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index b4529bd..99157b8 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -172,8 +172,10 @@ static int windows_thread_alive (struct target_ops *, ptid_t);
  static void windows_kill_inferior (struct target_ops *);
  
  static void cygwin_set_dr (int i, CORE_ADDR addr);
+static CORE_ADDR cygwin_get_dr (int i);
  static void cygwin_set_dr7 (unsigned long val);
  static unsigned long cygwin_get_dr6 (void);
+static unsigned long cygwin_get_dr7 (void);
  
  static enum target_signal last_sig = TARGET_SIGNAL_0;
  /* Set if a signal was received from the debugged process.  */


asmwarrior
ollydbg from codeblocks' forum

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 14:17 [windows mingw]gdb cvs head build error in windows-nat.c asmwarrior
  2011-12-16 14:30 ` asmwarrior
@ 2011-12-16 14:30 ` Eli Zaretskii
  2011-12-16 14:35   ` asmwarrior
  2011-12-16 14:51   ` Eli Zaretskii
  1 sibling, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2011-12-16 14:30 UTC (permalink / raw)
  To: asmwarrior; +Cc: gdb

> Date: Fri, 16 Dec 2011 22:21:24 +0800
> From: asmwarrior <asmwarrior@gmail.com>
> 
> ../../gdb/gdb/windows-nat.c: In function 'init_windows_ops':
> ../../gdb/gdb/windows-nat.c:2517:26: error: 'cygwin_get_dr' undeclared (first us
> e in this function)
> ../../gdb/gdb/windows-nat.c:2517:26: note: each undeclared identifier is reporte
> d only once for each function it appears in
> ../../gdb/gdb/windows-nat.c:2519:29: error: 'cygwin_get_dr7' undeclared (first u
> se in this function)
> cc1.exe: warnings being treated as errors
> ../../gdb/gdb/windows-nat.c: At top level:
> ../../gdb/gdb/windows-nat.c:2654:1: error: 'cygwin_get_dr' defined but not used
> ../../gdb/gdb/windows-nat.c:2673:1: error: 'cygwin_get_dr7' defined but not used
> [...]
> any ideas?

An idea: actually implement cygwin_set_dr7 ;-)

As for cygwin_get_dr, add a prototype before the first use.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 14:30 ` Eli Zaretskii
@ 2011-12-16 14:35   ` asmwarrior
  2011-12-16 14:51   ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: asmwarrior @ 2011-12-16 14:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

On 2011-12-16 22:29, Eli Zaretskii wrote:
> An idea: actually implement cygwin_set_dr7;-)
>
> As for cygwin_get_dr, add a prototype before the first use.
Hi, thanks for the reply, I just send a patch (add prototypes) to fix this minutes ago.

asmwarrior
ollydbg from codeblocks' forum

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 14:30 ` Eli Zaretskii
  2011-12-16 14:35   ` asmwarrior
@ 2011-12-16 14:51   ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2011-12-16 14:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: asmwarrior, gdb

> Date: Fri, 16 Dec 2011 16:29:57 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: gdb@sourceware.org
> 
> An idea: actually implement cygwin_set_dr7 ;-)

Ignore me: I was looking at a stale version.  Sorry.

Adding a prototype is the right thing.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 14:30 ` asmwarrior
@ 2011-12-16 15:17   ` Pierre Muller
  2011-12-16 16:16     ` Pedro Alves
  2011-12-16 17:16     ` Pierre Muller
  0 siblings, 2 replies; 10+ messages in thread
From: Pierre Muller @ 2011-12-16 15:17 UTC (permalink / raw)
  To: 'asmwarrior', gdb; +Cc: 'gdb-patches'



> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> de asmwarrior
> Envoyé : vendredi 16 décembre 2011 15:34
> À : gdb@sourceware.org
> Objet : Re: [windows mingw]gdb cvs head build error in windows-nat.c
> 
> On 2011-12-16 22:21, asmwarrior wrote:
> > I build under MSYS+mingw
> > Here is the build error:
I confirm that this build failure also exists for cygwin native build. 
> This patch should fix the build error.
> 
>   gdb/windows-nat.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)

  Any small patch that resolves a build failure 
(especially for a native target) should be considered
as obvious and can thus be applied without 
the need to wait for approval by a global maintainers.

   But the patch should probably be sent to
gdb-patches mailing list together with the used ChangeLog entry.

Pierre Muller

 
> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index b4529bd..99157b8 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -172,8 +172,10 @@ static int windows_thread_alive (struct target_ops *,
> ptid_t);
>   static void windows_kill_inferior (struct target_ops *);
> 
>   static void cygwin_set_dr (int i, CORE_ADDR addr);
> +static CORE_ADDR cygwin_get_dr (int i);
>   static void cygwin_set_dr7 (unsigned long val);
>   static unsigned long cygwin_get_dr6 (void);
> +static unsigned long cygwin_get_dr7 (void);
> 
>   static enum target_signal last_sig = TARGET_SIGNAL_0;
>   /* Set if a signal was received from the debugged process.  */
> 
> 
> asmwarrior
> ollydbg from codeblocks' forum

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 15:17   ` Pierre Muller
@ 2011-12-16 16:16     ` Pedro Alves
  2011-12-16 17:16     ` Pierre Muller
  1 sibling, 0 replies; 10+ messages in thread
From: Pedro Alves @ 2011-12-16 16:16 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pierre Muller, 'asmwarrior', gdb

On Friday 16 December 2011 15:16:48, Pierre Muller wrote:

>   Any small patch that resolves a build failure 
> (especially for a native target) should be considered
> as obvious and can thus be applied without 
> the need to wait for approval by a global maintainers.

Unless it isn't obvious :-) but I agree this one is as
obvious as it can get.  Please go ahead and apply it
if it fixes the issue.  Thanks, and sorry for the breakage.

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 15:17   ` Pierre Muller
  2011-12-16 16:16     ` Pedro Alves
@ 2011-12-16 17:16     ` Pierre Muller
  2011-12-16 17:26       ` Pedro Alves
  1 sibling, 1 reply; 10+ messages in thread
From: Pierre Muller @ 2011-12-16 17:16 UTC (permalink / raw)
  To: 'asmwarrior', gdb; +Cc: 'gdb-patches'



> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> de Pierre Muller
> Envoyé : vendredi 16 décembre 2011 16:17
> À : 'asmwarrior'; gdb@sourceware.org
> Cc : 'gdb-patches'
> Objet : RE: [windows mingw]gdb cvs head build error in windows-nat.c
> 
> 
> 
> > -----Message d'origine-----
> > De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> > de asmwarrior
> > Envoyé : vendredi 16 décembre 2011 15:34
> > À : gdb@sourceware.org
> > Objet : Re: [windows mingw]gdb cvs head build error in windows-nat.c
> >
> > On 2011-12-16 22:21, asmwarrior wrote:
> > > I build under MSYS+mingw
> > > Here is the build error:
> I confirm that this build failure also exists for cygwin native build.
> > This patch should fix the build error.
> >
> >   gdb/windows-nat.c |    2 ++
> >   1 files changed, 2 insertions(+), 0 deletions(-)
> 
>   Any small patch that resolves a build failure
> (especially for a native target) should be considered
> as obvious and can thus be applied without
> the need to wait for approval by a global maintainers.
> 
>    But the patch should probably be sent to
> gdb-patches mailing list together with the used ChangeLog entry.

  I realized that I was assuming that you had write access to gdb cvs directory...
If this is not the case, I can commit the change for you,
just tell me under which name you would like to be acknowledged in the ChangeLog
or if the below is OK for you.

Pierre Muller


ChangeLog entry:

2011-12-16  Pierre Muller  <muller@ics.u-strasbg.fr>  (obvious fix)

	From asmwarrior  <asmwarrior@gmail.com>	
	* windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missing prototypes.


Index: windows-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/windows-nat.c,v
retrieving revision 1.221
diff -u -p -r1.221 windows-nat.c
--- windows-nat.c       14 Dec 2011 17:20:31 -0000      1.221
+++ windows-nat.c       16 Dec 2011 17:12:25 -0000
@@ -173,7 +173,9 @@ static void windows_kill_inferior (struc

 static void cygwin_set_dr (int i, CORE_ADDR addr);
 static void cygwin_set_dr7 (unsigned long val);
+static CORE_ADDR cygwin_get_dr (int i);
 static unsigned long cygwin_get_dr6 (void);
+static unsigned long cygwin_get_dr7 (void);

 static enum target_signal last_sig = TARGET_SIGNAL_0;
 /* Set if a signal was received from the debugged process.  */

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 17:16     ` Pierre Muller
@ 2011-12-16 17:26       ` Pedro Alves
  2011-12-16 19:58         ` Pierre Muller
  0 siblings, 1 reply; 10+ messages in thread
From: Pedro Alves @ 2011-12-16 17:26 UTC (permalink / raw)
  To: gdb; +Cc: Pierre Muller, 'asmwarrior', 'gdb-patches'

On Friday 16 December 2011 17:16:30, Pierre Muller wrote:

> ChangeLog entry:
> 
> 2011-12-16  Pierre Muller  <muller@ics.u-strasbg.fr>  (obvious fix)
> 
> 	From asmwarrior  <asmwarrior@gmail.com>	
> 	* windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missing prototypes.

Please follow:

http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs

"
When you install someone else’s changes, put the contributor’s name in the change 
log entry rather than in the text of the entry. In other words, write this:

2002-07-14  John Doe  <jdoe@gnu.org>

        * sewing.c: Make it sew.

rather than this:

2002-07-14  Usual Maintainer  <usual@gnu.org>

        * sewing.c: Make it sew.  Patch by jdoe@gnu.org.
"

-- 
Pedro Alves

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [windows mingw]gdb cvs head build error in windows-nat.c
  2011-12-16 17:26       ` Pedro Alves
@ 2011-12-16 19:58         ` Pierre Muller
  0 siblings, 0 replies; 10+ messages in thread
From: Pierre Muller @ 2011-12-16 19:58 UTC (permalink / raw)
  To: 'Pedro Alves', 'gdb-patches', gdb, 'asmwarrior'

OK, 
I committed the obvious fix, see:
http://sourceware.org/ml/gdb-cvs/2011-12/msg00156.html


The ChangeLog entry is:
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.13629
retrieving revision 1.13630
diff -u -r1.13629 -r1.13630
--- src/gdb/ChangeLog	2011/12/16 19:06:34	1.13629
+++ src/gdb/ChangeLog	2011/12/16 19:55:26	1.13630
@@ -1,3 +1,8 @@
+2011-12-16  asmwarrior  <asmwarrior@gmail.com>	(obvious fix)
+
+	* windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missing
+	prototypes.
+
 2011-12-16  Doug Evans  <dje@google.com>
 
 	* NEWS: Add entry for stdio gdbserver.


Pierre

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-16 19:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 14:17 [windows mingw]gdb cvs head build error in windows-nat.c asmwarrior
2011-12-16 14:30 ` asmwarrior
2011-12-16 15:17   ` Pierre Muller
2011-12-16 16:16     ` Pedro Alves
2011-12-16 17:16     ` Pierre Muller
2011-12-16 17:26       ` Pedro Alves
2011-12-16 19:58         ` Pierre Muller
2011-12-16 14:30 ` Eli Zaretskii
2011-12-16 14:35   ` asmwarrior
2011-12-16 14:51   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).