Re: Dwarf problem with gcc and gdb

2015-12-08 Thread Oleksandr Tymoshenko

> On Dec 8, 2015, at 10:42 AM, John Baldwin  wrote:
> 
> On Tuesday, December 08, 2015 12:31:11 PM David Chisnall wrote:
>> The gdb in the base system doesn’t support DWARF4.  Use gdb791 or lldb-devel 
>> from ports (I believe gdb791 is probably a better bet on ARM, currently).
> 
> gdb710 in ports does not support arm (yet).

I have half-baked solution for gdb7/arm:

https://people.freebsd.org/~gonzo/arm/gdb7-arm.diff

And cognet@ worked on cross-debugging part, not sure how far he got. 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Dwarf problem with gcc and gdb

2015-12-08 Thread John Baldwin
On Tuesday, December 08, 2015 12:31:11 PM David Chisnall wrote:
> The gdb in the base system doesn’t support DWARF4.  Use gdb791 or lldb-devel 
> from ports (I believe gdb791 is probably a better bet on ARM, currently).

gdb710 in ports does not support arm (yet).

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Dwarf problem with gcc and gdb

2015-12-08 Thread Dimitry Andric
On 08 Dec 2015, at 10:02, Ray Newman  wrote:
> 
> Compiled using gcc (FreeBSD Ports Collection) 4.8.5 on arm (Raspberry Pi - 
> several versions); BSDmakefile attached (make test used).
> gdb gives:
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "armv6-marcel-freebsd"...Dwarf Error: wrong 
> version in compilation unit header (is 4, should be 2) [in module 
> /home/ray/mumps/mumps]
> 
> I need to fix this to find the *real* problem.

Since gcc 4.8.0, it defaults to -gdwarf-4.  You must explicitly use
-gdwarf-2, if you want to debug with the version of gdb in base.

Alternatively, use the gdb port, or lldb.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Dwarf problem with gcc and gdb

2015-12-08 Thread David Chisnall
The gdb in the base system doesn’t support DWARF4.  Use gdb791 or lldb-devel 
from ports (I believe gdb791 is probably a better bet on ARM, currently).

David

> On 8 Dec 2015, at 09:02, Ray Newman  wrote:
> 
> Hi,
> 
> Compiled using gcc (FreeBSD Ports Collection) 4.8.5 on arm (Raspberry Pi - 
> several versions); BSDmakefile attached (make test used).
> gdb gives:
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "armv6-marcel-freebsd"...Dwarf Error: wrong 
> version in compilation unit header (is 4, should be 2) [in module 
> /home/ray/mumps/mumps]
> 
> I need to fix this to find the *real* problem.
> 
> Thanks,  Ray
> 
> 
> # Makefile for MUMPS BSD
> # Copyright (c) Raymond Douglas Newman, 1999 - 2014
> # with help from Sam Habiel
> 
> CC  =   gcc
> LIBS  = -lm -lcrypt
> EXTRA = -O -Wall -Iinclude
> 
> .ifmake test
> EXTRA = -O0 -g  -gdwarf-2 -gstrict-dwarf -ggdb -Wall -Iinclude
> .endif
> 
> SUBDIRS=compile database init runtime seqio symbol util xcall
> 
> RM=rm -f
> 
> PROG  = mumps
> 
> OBJS=   compile/dollar.o \
>compile/eval.o \
>compile/localvar.o \
>compile/parse.o \
>compile/routine.o \
>database/db_buffer.o \
>database/db_daemon.o \
>database/db_get.o \
>database/db_ic.o \
>database/db_kill.o \
>database/db_locate.o \
>database/db_main.o \
>database/db_rekey.o \
>database/db_set.o \
>database/db_uci.o \
>database/db_util.o \
>database/db_view.o \
>init/init_create.o \
>init/init_run.o \
>init/init_start.o \
>init/mumps.o \
>runtime/runtime_attn.o \
>runtime/runtime_buildmvar.o \
>runtime/runtime_debug.o \
>runtime/runtime_func.o \
>runtime/runtime_math.o \
>runtime/runtime_pattern.o \
>runtime/runtime_run.o \
>runtime/runtime_ssvn.o \
>runtime/runtime_util.o \
>runtime/runtime_vars.o \
>seqio/SQ_Util.o \
>seqio/SQ_Signal.o \
>seqio/SQ_Device.o \
>seqio/SQ_File.o \
>seqio/SQ_Pipe.o \
>seqio/SQ_Seqio.o \
>seqio/SQ_Socket.o \
>seqio/SQ_Tcpip.o \
>symbol/symbol_new.o \
>symbol/symbol_util.o \
>util/util_key.o \
>util/util_lock.o \
>util/util_memory.o \
>util/util_routine.o \
>util/util_share.o \
>util/util_strerror.o \
>xcall/xcall.o
> 
> .c.o:
>${CC} ${EXTRA} -c $< -o $@
> 
> all: ${OBJS}
>${CC} ${EXTRA} -o ${PROG} ${OBJS} ${LIBS}
> 
> test: ${OBJS}
>${CC} ${EXTRA} -o ${PROG} ${OBJS} ${LIBS}
> 
> clean:
>rm -f ${OBJS} ${PROG} ${PROG}.core
> 

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Dwarf problem with gcc and gdb

2015-12-08 Thread Ray Newman
Hi,

Compiled using gcc (FreeBSD Ports Collection) 4.8.5 on arm (Raspberry Pi - 
several versions); BSDmakefile attached (make test used).
gdb gives:
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "armv6-marcel-freebsd"...Dwarf Error: wrong version 
in compilation unit header (is 4, should be 2) [in module /home/ray/mumps/mumps]

I need to fix this to find the *real* problem.

Thanks,  Ray


# Makefile for MUMPS BSD
# Copyright (c) Raymond Douglas Newman, 1999 - 2014
# with help from Sam Habiel

CC  =   gcc
LIBS  = -lm -lcrypt
EXTRA = -O -Wall -Iinclude

.ifmake test
EXTRA = -O0 -g  -gdwarf-2 -gstrict-dwarf -ggdb -Wall -Iinclude
.endif

SUBDIRS=compile database init runtime seqio symbol util xcall

RM=rm -f

PROG  = mumps

OBJS=   compile/dollar.o \
compile/eval.o \
compile/localvar.o \
compile/parse.o \
compile/routine.o \
database/db_buffer.o \
database/db_daemon.o \
database/db_get.o \
database/db_ic.o \
database/db_kill.o \
database/db_locate.o \
database/db_main.o \
database/db_rekey.o \
database/db_set.o \
database/db_uci.o \
database/db_util.o \
database/db_view.o \
init/init_create.o \
init/init_run.o \
init/init_start.o \
init/mumps.o \
runtime/runtime_attn.o \
runtime/runtime_buildmvar.o \
runtime/runtime_debug.o \
runtime/runtime_func.o \
runtime/runtime_math.o \
runtime/runtime_pattern.o \
runtime/runtime_run.o \
runtime/runtime_ssvn.o \
runtime/runtime_util.o \
runtime/runtime_vars.o \
seqio/SQ_Util.o \
seqio/SQ_Signal.o \
seqio/SQ_Device.o \
seqio/SQ_File.o \
seqio/SQ_Pipe.o \
seqio/SQ_Seqio.o \
seqio/SQ_Socket.o \
seqio/SQ_Tcpip.o \
symbol/symbol_new.o \
symbol/symbol_util.o \
util/util_key.o \
util/util_lock.o \
util/util_memory.o \
util/util_routine.o \
util/util_share.o \
util/util_strerror.o \
xcall/xcall.o

.c.o:
${CC} ${EXTRA} -c $< -o $@

all: ${OBJS}
${CC} ${EXTRA} -o ${PROG} ${OBJS} ${LIBS}

test: ${OBJS}
${CC} ${EXTRA} -o ${PROG} ${OBJS} ${LIBS}

clean:
rm -f ${OBJS} ${PROG} ${PROG}.core



signature.asc
Description: Message signed with OpenPGP using GPGMail