This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug sim/13160] bfin simulator does not build on Darwin
- From: "chrisj at rtems dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 10 Mar 2015 05:09:07 +0000
- Subject: [Bug sim/13160] bfin simulator does not build on Darwin
- Auto-submitted: auto-generated
- References: <bug-13160-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=13160
--- Comment #6 from Chris Johns <chrisj at rtems dot org> ---
(In reply to Mike Frysinger from comment #5)
> (In reply to Chris Johns from comment #4)
>
> my guess is you're copying & pasting the command from your terminal and that
> isn't preserving the tabs. instead you're pasting a command that uses
> spaces.
Nice guess. Using C-v<tab> worked.
> you want something like:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
> sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;p}'
I think \t is a GNU extension.
> i don't know why that's failing as, afaict, the code is POSIX compliant.
> maybe Darwin has a crappy implementation ? i've tried `sed --posix` and
> `minised` and `busybox sed` and they all work (well, almost ... minised
> doesn't handle tabs correctly).
The sed looks similar to FreeBSD. It also fails in the same way.
>
> maybe it can't handle a nested print ? what if you combine it with the s:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
> sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:gp}'
>
> if that still fails, try unrolling it:
> bfin-elf-objdump -d -z linux-fixed-code.o | \
> sed -n -e 's:^[^\t]*\t:0x:' -e '/^0x/{s:\t.*::;s: *$:,:;s: :, 0x:g;
> p
> }'
Ah ok, thanks for posting this. The following seems this works on MacOS and
FreeBSD ...
sed -n -e 's:^[^ ]* :0x:' -e '/^0x/{s: .*::;s: *$:,:g;p;}'
../../../binutils-gdb/sim/bfin/linux-fixed-code.h.dis
This is with <tab> characters and a ';' after the 'p'.
--
You are receiving this mail because:
You are on the CC list for the bug.