some compile errors fo gdb-7.0.1

Pedro Alves pedro@codesourcery.com
Thu Feb 18 19:23:00 GMT 2010


[moving from bug-gdb@gnu.org, patches go to gdb-patches@]

On Monday 15 February 2010 14:16:21, Harald Koenig wrote:
> Hi,
> 
> trying to compile gdb-7.0.1 on HP-UX, the hp cc complains about some problems in
> mi-main.c and breakpoint.c symfile.c
> 
>        cc: "/soft/os/gdb/gdb-7.0.1/gdb-7.0.1/gdb/mi/mi-main.c", line 176: error 1610: Attempting to return value from function of type void.
>        cc: "/soft/os/gdb/gdb-7.0.1/gdb-7.0.1/gdb/breakpoint.c", line 8275: error 1000: Unexpected symbol: "}".
>        cc: "/soft/os/gdb/gdb-7.0.1/gdb-7.0.1/gdb/symfile.c", line 4036: error 1649: Illegal integer-pointer combination for >.
> 
> obvious patches attached...

Thanks.  I've applied it to mainline, as below, after
running the testsuite with it and finding on regressions.
The breakpoint.c hunk was no longer necessary, the same fix
had already been applied since 7 was released.

I encourage you to try building cvs head, or a recent
snapshot with hp cc so catch other possible tweaks
necessary, as gdb 7.1 is close to branching out.

-- 
Pedro Alves

2010-02-18  Harald Koenig  <H.Koenig@science-computing.de>

	* mi/mi-main.c (mi_cmd_exec_jump): Drop unneeded `return'.
	* symfile.c (symfile_map_offsets_to_segments): Fix assertion.

---
 gdb/mi/mi-main.c |    2 +-
 gdb/symfile.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: src/gdb/mi/mi-main.c
===================================================================
--- src.orig/gdb/mi/mi-main.c	2010-02-17 19:41:35.000000000 +0000
+++ src/gdb/mi/mi-main.c	2010-02-18 18:13:08.000000000 +0000
@@ -190,7 +190,7 @@ void
 mi_cmd_exec_jump (char *args, char **argv, int argc)
 {
   /* FIXME: Should call a libgdb function, not a cli wrapper.  */
-  return mi_execute_async_cli_command ("jump", argv, argc);
+  mi_execute_async_cli_command ("jump", argv, argc);
 }
  
 static int
Index: src/gdb/symfile.c
===================================================================
--- src.orig/gdb/symfile.c	2010-02-17 22:01:03.000000000 +0000
+++ src/gdb/symfile.c	2010-02-18 18:13:08.000000000 +0000
@@ -3715,7 +3715,7 @@ symfile_map_offsets_to_segments (bfd *ab
 
   /* It doesn't make sense to call this function unless you have some
      segment base addresses.  */
-  gdb_assert (segment_bases > 0);
+  gdb_assert (num_segment_bases > 0);
 
   /* If we do not have segment mappings for the object file, we
      can not relocate it by segments.  */



More information about the Gdb-patches mailing list