OpenBSD CVS

CVS log for src/sys/ddb/db_elf.c


[BACK] Up to [local] / src / sys / ddb

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32 / (download) - annotate - [select for diffs], Fri Mar 12 10:22:46 2021 UTC (3 years, 2 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

spelling

Revision 1.31 / (download) - annotate - [select for diffs], Thu Oct 15 03:14:00 2020 UTC (3 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

sick of the CMU, let's make this KNF

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 26 21:35:43 2020 UTC (4 years ago) by gkoehler
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

Stop requiring that .strtab has long alignment.

When ddb loads symbols, the .strtab contains char strings and doesn't
need long alignment.  Our bootloader provides long alignment, but I
started loading symbols on powerpc64 without our bootloader.

ok mpi@ guenther@ kettenis@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Nov 7 13:16:25 2019 UTC (4 years, 7 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.28: +2 -3 lines
Diff to previous 1.28 (colored)

db_addr_t -> vaddr_t

ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Sep 8 05:36:52 2017 UTC (6 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.27: +2 -3 lines
Diff to previous 1.27 (colored)

If you use sys/param.h, you don't need sys/types.h

Revision 1.27 / (download) - annotate - [select for diffs], Thu Aug 10 19:39:38 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

With a CTF kernel, DDB's print command will now pretty-print symbols.

Casting a type is not yet supported.

ok kettenis@, jasper@

Revision 1.26 / (download) - annotate - [select for diffs], Tue May 30 15:39:05 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.25: +7 -7 lines
Diff to previous 1.25 (colored)

Kill db_sym_t.

ok deraadt@, kettenis@, jasper@

Revision 1.25 / (download) - annotate - [select for diffs], Sun May 28 11:41:52 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.24: +7 -8 lines
Diff to previous 1.24 (colored)

Merge two functions to lookup ELF sections by name.

ok claudio@, jasper@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Feb 8 04:30:45 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.23: +7 -7 lines
Diff to previous 1.23 (colored)

Use ELF_ST_{BIND,TYPE} instead of ELFDEFNNAME(ST_{BIND,TYPE})

ok jca@

Revision 1.23 / (download) - annotate - [select for diffs], Fri Sep 16 19:13:17 2016 UTC (7 years, 8 months ago) by jasper
Branch: MAIN
Changes since 1.22: +3 -16 lines
Diff to previous 1.22 (colored)

teach ddb(4) about CTF. currently it only loads the CTF and uses it on amd64
to lookup the number of function parameters. however having this basic
facility allows us to expand it's usage.

currently hidden behind the (disabled) DDBCTF kernel option as some of the
required tools are not available in base yet. in addition to that one
also needs recent bootblocks that load the .SUNW_ctf kernel section.

discussed with mpi@ over many a cider and ale in cambridge
feedback and ok guenther@ mpi@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Apr 20 08:02:59 2016 UTC (8 years, 1 month ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.21: +1 -2 lines
Diff to previous 1.21 (colored)

Collapse db_dwarf.h into db_sym.h

ok matthew@

Revision 1.21 / (download) - annotate - [select for diffs], Mon Mar 7 11:26:43 2016 UTC (8 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.20: +10 -10 lines
Diff to previous 1.20 (colored)

boolean_t/FALSE/TRUE -> int/0/1

Revision 1.20 / (download) - annotate - [select for diffs], Sun Mar 6 19:05:30 2016 UTC (8 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.19: +7 -3 lines
Diff to previous 1.19 (colored)

Merge db_elf_sym_values() into db_symbol_values().

ok stefan@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Mar 1 21:32:02 2016 UTC (8 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.18: +18 -5 lines
Diff to previous 1.18 (colored)

Make db_value_of_name() call db_elf_sym_lookup() in order to kill
db_lookup() as requested by mlarkin@

While here move the function to db_elf.c do keep db_elf_sym_lookup()
private.

ok mikeb@ appart from the move the function

Revision 1.18 / (download) - annotate - [select for diffs], Tue Mar 1 11:56:00 2016 UTC (8 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)

DB_SYM_NULL -> NULL.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Feb 27 13:17:47 2016 UTC (8 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.16: +50 -20 lines
Diff to previous 1.16 (colored)

Remove the "symbol table" argument of the functions dealing with
symbols.

There's no reason to ask the programmer to supply a specific symbol
table since the kernel only have one.

ok visa@, guenther@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jan 27 10:37:12 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.15: +5 -44 lines
Diff to previous 1.15 (colored)

Removes the abstraction layer to support multiple executable binaries.

Simplifies the API to manipulate symbols now that all our architectures
are ELF.

ok tb@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 25 14:56:03 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.14: +3 -4 lines
Diff to previous 1.14 (colored)

Do not mix variable declaration and logic.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 25 14:30:30 2016 UTC (8 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

Kill trailing whitespaces.  No object change.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:46 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Oct 9 08:21:48 2014 UTC (9 years, 8 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.11: +48 -7 lines
Diff to previous 1.11 (colored)

ddb: add support for DWARF line number decoding

This allows ddb's "trace" command to include file and line numbers:

  ddb{0}> trace
  Debugger() at Debugger+0x9 [../../../../arch/amd64/amd64/db_interface.c:405]
  ddb_sysctl() at ddb_sysctl+0x1b4 [../../../../ddb/db_usrreq.c:104]
  sys___sysctl() at sys___sysctl+0x216 [../../../../kern/kern_sysctl.c:229]
  syscall() at syscall+0x297 [../../../../sys/syscall_mi.h:84]
  --- syscall (number 202) ---
  end of kernel
  end trace frame: 0x7f7ffffcf1d7, count: -4
  acpi_pdirpa+0x4117aa:

For this to work, it requires using a new version of boot(8), and
booting a kernel with the .debug_line section present (e.g., building
with ``makeoptions DEBUG="-g"'' and then booting the bsd.gdb kernel
instead of the stripped bsd kernel).

Still a WIP, but no failure reports yet.  Committing so further
development and testing can happen in tree.

prodding deraadt, guenther, mlarkin
ok mpi

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 14 14:17:24 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (colored)

remove uneeded proc.h includes
ok mpi@ kspillner@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Mar 16 20:31:46 2014 UTC (10 years, 2 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.9: +1 -10 lines
Diff to previous 1.9 (colored)

DDB supports ELF symbols are all archs, and it's always the same as the
native size, so eliminate the #defines.

ok miod@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jun 26 05:42:14 2008 UTC (15 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.8: +1 -8 lines
Diff to previous 1.8 (colored)

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Oct 6 19:49:52 2007 UTC (16 years, 8 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

Use db_printf instead of printf, to prevent problems with locking
kprintf_mutex in the early stages of booting.

ok miod@ (a while ago)

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 13 06:23:20 2006 UTC (18 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.6: +18 -38 lines
Diff to previous 1.6 (colored)

ansi/deregister. No binary change.

Revision 1.2.4.4 / (download) - annotate - [select for diffs], Sat Jun 7 11:02:28 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.2.4.3: +25 -1 lines
Diff to previous 1.2.4.3 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync SMP branch to -current

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 1 16:19:00 2003 UTC (21 years ago) by art
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.5: +25 -1 lines
Diff to previous 1.5 (colored)

When searching for the symbol table and string table we were looking
for ".symtab" and ".strtab" in the section names. Instead of doing that,
look for section type SHT_SYMTAB for the symbol table and follow the link
in sh_link to find the corresponding string table. This is a more correct
way of doing things and will work better when the toolchain doesn't
generate ".symtab" and ".strtab" names and it will work when there are
multiple symbol tables.

noone objected to this diff for at least a week.

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:28:48 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.3: +17 -17 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

Sync UBC branch to -current

Revision 1.2.4.3 / (download) - annotate - [select for diffs], Thu Mar 28 11:43:03 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.2.4.2: +17 -17 lines
Diff to previous 1.2.4.2 (colored) to branchpoint 1.2 (colored)

Merge in -current from about a week ago

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 14 03:16:03 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

Final __P removal plus some cosmetic fixups

Revision 1.4 / (download) - annotate - [select for diffs], Thu Mar 14 01:26:51 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.3: +14 -14 lines
Diff to previous 1.3 (colored)

First round of __P removal in sys

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Wed Oct 31 03:11:47 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.2.4.1: +15 -6 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 19 16:25:00 2001 UTC (22 years, 9 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.2: +15 -6 lines
Diff to previous 1.2 (colored)

Print a reason for failing to init the symbol table.

Revision 1.2.4.1 / (download) - annotate - [select for diffs], Mon May 14 22:06:57 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 15 07:35:46 2001 UTC (23 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Branch point for: SMP
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

$OpenBSD$

Revision 1.1 / (download) - annotate - [select for diffs], Sat Feb 10 10:43:18 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN

new symbol handling in ddb for ELF, there is still a problem with hangman on alpha though..

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.