From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28386 invoked by alias); 10 Mar 2015 05:09:09 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 28361 invoked by uid 48); 10 Mar 2015 05:09:09 -0000 From: "chrisj at rtems dot org" To: gdb-prs@sourceware.org Subject: [Bug sim/13160] bfin simulator does not build on Darwin Date: Tue, 10 Mar 2015 05:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: sim X-Bugzilla-Version: 7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chrisj at rtems dot org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: vapier at gentoo dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00410.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13160 --- Comment #6 from Chris Johns --- (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 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 characters and a ';' after the 'p'. -- You are receiving this mail because: You are on the CC list for the bug.