Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 3/3] btrace, vdso: add vdso target sections
Date: Thu, 29 May 2014 16:54:00 -0000	[thread overview]
Message-ID: <5387663A.5040704@redhat.com> (raw)
In-Reply-To: <1400655682-4014-3-git-send-email-markus.t.metzger@intel.com>

Hi Markus,

On 05/21/2014 08:01 AM, Markus Metzger wrote:
> When loading symbols for the vdso, also add its sections to target_sections.
> 
> This fixes an issue with record btrace where vdso instructions could not be
> disassembled during replay.
> 
> 2014-05-21  Markus Metzger  <markus.t.metzger@intel.com>
> 
> 	* symfile-mem.c (symbol_file_add_from_memory): Add BFD sections.

Unfortunately this caused regressions in break-interp.exp:

 Running ../../../src/gdb/testsuite/gdb.base/break-interp.exp ...
 ERROR: Process no longer exists

That is GDB crashing.

589fdceb99db9868e34bc976b7e234dbfaf327e2 is the first bad commit
commit 589fdceb99db9868e34bc976b7e234dbfaf327e2
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Apr 2 09:54:11 2014 +0200

    btrace, vdso: add vdso target sections

    When loading symbols for the vdso, also add its sections to target_sections.

    This fixes an issue with record btrace where vdso instructions could not be
    disassembled during replay.

        * symfile-mem.c (symbol_file_add_from_memory): Add BFD sections.

    testsuite/
        * gdb.btrace/vdso.c: New.
        * gdb.btrace/vdso.exp: New.


Core was generated by `/home/pedro/gdb/mygit/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000647bce in exec_set_section_address (filename=0x27bb1f0 "/home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/break-interp-LDprelinkNOdebugNO", index=0,
    address=139930618982856) at ../../src/gdb/exec.c:919
919           if (filename_cmp (filename, p->the_bfd_section->owner->filename) == 0
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x7127ee: file ../../src/gdb/utils.c, line 806.
Breakpoint 2 at 0x4fca7c: file ../../src/gdb/cli/cli-cmds.c, line 219.
(top-gdb) bt
#0  0x0000000000647bce in exec_set_section_address (filename=0x27bb1f0 "/home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/break-interp-LDprelinkNOdebugNO", index=0,
    address=139930618982856) at ../../src/gdb/exec.c:919
#1  0x000000000064b61d in objfile_relocate1 (objfile=0x27baf70, new_offsets=0x7fff536105a0) at ../../src/gdb/objfiles.c:819
#2  0x000000000064b673 in objfile_relocate (objfile=0x27baf70, new_offsets=0x7fff536105a0) at ../../src/gdb/objfiles.c:843
#3  0x000000000049eeb2 in svr4_relocate_main_executable () at ../../src/gdb/solib-svr4.c:2883
#4  0x000000000049ef55 in svr4_solib_create_inferior_hook (from_tty=0) at ../../src/gdb/solib-svr4.c:2927
#5  0x0000000000730b0e in solib_create_inferior_hook (from_tty=0) at ../../src/gdb/solib.c:1211
#6  0x00000000005e5345 in post_create_inferior (target=0xd02c00 <current_target>, from_tty=0) at ../../src/gdb/infcmd.c:443
#7  0x00000000005e5744 in run_command_1 (args=0x0, from_tty=1, tbreak_at_main=0) at ../../src/gdb/infcmd.c:628
#8  0x00000000005e57a0 in run_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:642
#9  0x00000000004f68b6 in do_cfunc (c=0x261b9e0, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:107
#10 0x00000000004f99aa in cmd_func (cmd=0x261b9e0, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:1886
#11 0x000000000070f7f2 in execute_command (p=0x250f393 "", from_tty=1) at ../../src/gdb/top.c:461
#12 0x0000000000610f0f in command_handler (command=0x250f390 "") at ../../src/gdb/event-top.c:438
#13 0x00000000006114c8 in command_line_handler (rl=0x2801b70 "run") at ../../src/gdb/event-top.c:635
#14 0x000000000077177a in rl_callback_read_char () at ../../src/readline/callback.c:220
#15 0x0000000000610a3d in rl_callback_read_char_wrapper (client_data=0x0) at ../../src/gdb/event-top.c:167
#16 0x0000000000610e21 in stdin_event_handler (error=0, client_data=0x0) at ../../src/gdb/event-top.c:378
#17 0x000000000060fa07 in handle_file_event (data=...) at ../../src/gdb/event-loop.c:768
#18 0x000000000060eee9 in process_event () at ../../src/gdb/event-loop.c:342
#19 0x000000000060ef8b in gdb_do_one_event () at ../../src/gdb/event-loop.c:394
#20 0x000000000060f000 in start_event_loop () at ../../src/gdb/event-loop.c:431
#21 0x0000000000610a6f in cli_command_loop (data=0x0) at ../../src/gdb/event-top.c:182
#22 0x0000000000606f09 in current_interp_command_loop () at ../../src/gdb/interps.c:350
#23 0x00000000006080ad in captured_command_loop (data=0x0) at ../../src/gdb/main.c:301
#24 0x0000000000604223 in catch_errors (func=0x608092 <captured_command_loop>, func_args=0x0, errstring=0x8e7001 "", mask=RETURN_MASK_ALL)
    at ../../src/gdb/exceptions.c:524
#25 0x00000000006094b3 in captured_main (data=0x7fff53610d50) at ../../src/gdb/main.c:1097
#26 0x0000000000604223 in catch_errors (func=0x608345 <captured_main>, func_args=0x7fff53610d50, errstring=0x8e7001 "", mask=RETURN_MASK_ALL)
    at ../../src/gdb/exceptions.c:524
#27 0x00000000006094dc in gdb_main (args=0x7fff53610d50) at ../../src/gdb/main.c:1105
#28 0x000000000045dbd7 in main (argc=5, argv=0x7fff53610e58) at ../../src/gdb/gdb.c:33

-- 
Pedro Alves


  parent reply	other threads:[~2014-05-29 16:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21  7:01 [PATCH v3 1/3] btrace: control memory access during replay Markus Metzger
2014-05-21  7:01 ` [PATCH v3 3/3] btrace, vdso: add vdso target sections Markus Metzger
2014-05-21  9:55   ` Pedro Alves
2014-05-29 16:54   ` Pedro Alves [this message]
2014-05-29 17:03     ` Pedro Alves
2014-06-02  8:20       ` Metzger, Markus T
2014-06-02  9:43         ` Metzger, Markus T
2014-06-02 12:41       ` Metzger, Markus T
2014-06-04 12:37         ` Metzger, Markus T
2014-05-21  7:02 ` [PATCH v3 2/3] test, gcore: move capture_command_output into lib/gdb.exp Markus Metzger
2014-05-21  9:55   ` Pedro Alves
2014-05-21  9:55 ` [PATCH v3 1/3] btrace: control memory access during replay Pedro Alves

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=5387663A.5040704@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.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