public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Luke Diamand <ldiamand@roku.com>
Cc: "elfutils-devel@sourceware.org" <elfutils-devel@sourceware.org>
Subject: Re: [PATCHv1 0/2] specify a sysroot to search when examining a core file
Date: Thu, 31 Jan 2019 15:22:00 -0000	[thread overview]
Message-ID: <b2d6777e45495ecc8ae905ad94593b857a9da7ec.camel@klomp.org> (raw)
In-Reply-To: <BN7PR01MB3953544F2EDA1FB7BF6E9470B0970@BN7PR01MB3953.prod.exchangelabs.com>

Hi Luke,

(BTW. Note that HTML emails will get dropped, you should get a bounce
from the mailinglist.)

On Tue, 2019-01-29 at 19:46 +0000, Luke Diamand wrote:
> Thanks for the comments on the other emails, I'll rework my patch to
> incorporate them.
> 
> I've got a small test case I've been using which uses a prebuilt ARM
> and MIPS(!) libc.so (from buildroot) and a core file. But I think in
> theory it ought to be possible to fake something up with a purely
> source code based test. Perhaps create a shared library which dumps
> core, and play around with the rpath?
> 
> Is there an existing test case you would suggest that I start from?
> 
> I'll have a look.

To test cross arch things it is sometimes just necessary to include
precompiled binaries in the test files (hopefully as small as possible
of course).

For example the tests/run-backtrace-core-<arch>.sh tests include such
pregenerated binaries:

# executable generated by:
#
# gcc -D_GNU_SOURCE -I. -I.. -I../lib -m32 -pthread -static -g \
#     -o backtrace.ppc.exec backtrace-child.c
#
# core generated by:
#
# ./backtrace.ppc.exec --gencore

tests/backtrace-subr.sh has some overly complicated code to generate a
core file for the run-backtrace-native-core.sh testcase.
For none-core, running native tests you could look at
tests/run-native-test.sh

All these are slightly fragile though.

Cheers,

Mark

      parent reply	other threads:[~2019-01-31 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20 15:01 Luke Diamand
2019-01-20 15:01 ` [PATCHv1 1/2] libdwfl: specify optional sysroot to search for shared libraries Luke Diamand
2019-01-20 22:08   ` Dmitry V. Levin
2019-01-20 15:01 ` [PATCHv1 2/2] eu-stack: add support for sysroot option Luke Diamand
2019-01-29 13:47 ` [PATCHv1 0/2] specify a sysroot to search when examining a core file Mark Wielaard
     [not found]   ` <BN7PR01MB3953544F2EDA1FB7BF6E9470B0970@BN7PR01MB3953.prod.exchangelabs.com>
2019-01-31 15:22     ` Mark Wielaard [this message]

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=b2d6777e45495ecc8ae905ad94593b857a9da7ec.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=ldiamand@roku.com \
    /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: link
Be 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).