taskThe GNU Hurd - Tasks: task #6537, Implement ddb/db_elf.c


task #6537: Implement ddb/db_elf.c

Submitted by:  Samuel Thibault <sthibaul>
Submitted on:  Tue Feb 20 00:52:33 2007  
Category: GNU MachShould Start On: Mon Feb 19 23:00:00 2007
Should be Finished on: Mon Feb 19 23:00:00 2007Priority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenPlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Tue Jul 29 21:45:59 2008, comment #6:

Mmm, it is better indeed, it shows some numbers which are not the
beginning of the functions, but they are still wrong. For instance,
when interrupting execution of dd < /dev/zero > /dev/null, I got

ipc_mqueue_receive(104bbf38,0,2000,0,0)+1f1 [ipc_mqueue.c:659]
mach_msg_receive(126bc70,803,2000,10,0)+10a [mach_msg.c:257]

if I resolve the mach_msg_receive point by addr2line (mach_msg_receive
+ 0x10a), I get mach_msg.c:212 instead, which is indeed a place where
ipc_mqueue_receive is called.

Samuel Thibault <sthibaul>
Project Member
Fri Jul 25 18:27:59 2008, comment #5:

Fixed the db_error issue and the line number bug.
Same changelog.

(file #16184)

Andrei Barbu <abarbu>
Project Member
Fri Jul 18 17:50:41 2008, comment #4:

2008-07-18 Andrei Barbu <andrei@0xab.com>

  • ddb/db_elf.c: New file
  • ddb/db_sym.c: ELF prototypes and switch entries
  • ddb/db_sym.h: ELF symbol table type as the default
  • ddb/dwarf2.h: New file
  • ddb/elf32.h: New file
  • ddb/elf64.h: New file
  • elf_common.h: New file
  • elf_generic.h: New file
  • ddb/elf.h: New file
  • i386/i386/elf.h: New file
  • i386/i386at/model_dep.c: Start up the elf backend
  • Makefrag.am: Add ddb/db_elf.c
Andrei Barbu <abarbu>
Project Member
Fri Jul 18 17:28:59 2008, comment #3:

This is a rewrite of the elf backend to use dwarf instead of the elf symbols. It adds many features, the two most obvious ones are that it's a lot slower and that line numbers and files work in ddb. This is also a requirement for probe support.

(file #16148)

Andrei Barbu <abarbu>
Project Member
Tue May 27 18:52:36 2008, comment #2:

Updated the reflect the discussion on bug-hurd.

(file #15746)

Andrei Barbu <abarbu>
Project Member
Fri May 9 15:38:24 2008, comment #1:

Two patches that add this. The first extends symbol_values to take the symbol table as an argument, this is required for ELF. The second adds db_elf.c as well as a whole bunch of support files, enables ELF and adds it to model_dep. It also sets ELF as the default type, I don't think anyone still builds Mach as an a.out.

line_at_pc is not implemented at the moment. The above patch doesn't do any DWARF2 lookups, just symtab. All the other features should be fine.

The ELF headers are from FreeBSD, they have a nice way of dealing with 32/64bit versions so we're 64bit compatible.

(file #15645, file #15646)

Andrei Barbu <abarbu>
Project Member
Tue Feb 20 00:52:33 2007, original submission:

For getting useful information from ddb's trace command, ELF symbol lookup should be implemented in ddb/db_elf.c

Samuel Thibault <sthibaul>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #16184:  elf-patch added by abarbu (112kB - application/octet-stream)
file #16148:  elf-patch added by abarbu (109kB - application/octet-stream)
file #15747:  changelog-elf-1.patch added by abarbu (1kB - application/octet-stream)
file #15746:  elf-1.patch added by abarbu (71kB - application/octet-stream)
file #15645:  symbol_values.patch added by abarbu (1kB - application/octet-stream)
file #15646:  elf.patch added by abarbu (71kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by abarbu (Updated the item)
  • -unavailable- added by sthibaul (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jul 25 18:27:59 2008abarbuAttached File-=>Added elf-patch, #16184
    Fri Jul 18 17:28:59 2008abarbuAttached File-=>Added elf-patch, #16148
    Tue May 27 19:02:17 2008abarbuAttached File-=>Added changelog-elf-1.patch, #15747
    Tue May 27 18:52:36 2008abarbuAttached File-=>Added elf-1.patch, #15746
    Fri May 9 15:38:24 2008abarbuAttached File-=>Added symbol_values.patch, #15645
      Attached File-=>Added elf.patch, #15646

    Back to the top

    Powered by Savane 3.1-cleanup1