public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "chrisj at rtems dot org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-13160-4717-nMkQuibQ9R@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-13160-4717@http.sourceware.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.
next prev parent reply other threads:[~2015-03-10 5:09 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-07 0:20 [Bug build/13160] New: " chrisj at rtems dot org 2015-03-09 3:52 ` [Bug sim/13160] " vapier at gentoo dot org 2015-03-09 6:08 ` vapier at gentoo dot org 2015-03-10 2:18 ` chrisj at rtems dot org 2015-03-10 3:47 ` vapier at gentoo dot org 2015-03-10 4:33 ` chrisj at rtems dot org 2015-03-10 5:09 ` vapier at gentoo dot org 2015-03-10 5:42 ` chrisj at rtems dot org [this message] 2015-03-10 5:44 ` vapier at gentoo dot org 2015-03-10 14:04 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-13160-4717-nMkQuibQ9R@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).