diff options
author | 2015-07-07 19:31:02 +0000 | |
---|---|---|
committer | 2015-07-07 19:31:02 +0000 | |
commit | b9dc4958347c70a923523d6fa0c40a7f40b9cff2 (patch) | |
tree | 9d456687a2df95db49dfe82c70874b802d723177 /sys | |
parent | repair policy-ikesa-linking by replacing the broken RB_TREE w/TAILQ (diff) | |
download | wireguard-openbsd-b9dc4958347c70a923523d6fa0c40a7f40b9cff2.tar.xz wireguard-openbsd-b9dc4958347c70a923523d6fa0c40a7f40b9cff2.zip |
Return correct file name entry from DWARF line table
We run the DWARF line table program to generate each row of the table
until we find a row after the one we wanted, and then take the
previous row's entries. The code correctly took the previous row's
line number entry, but incorrectly took the current row's file name
entry. Notably, this caused DDB to report the wrong file names for
inlined calls to functions defined in header files.
ok mlarkin
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ddb/db_dwarf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ddb/db_dwarf.c b/sys/ddb/db_dwarf.c index 4ae22ec820a..6c14828e3c7 100644 --- a/sys/ddb/db_dwarf.c +++ b/sys/ddb/db_dwarf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_dwarf.c,v 1.1 2014/07/11 03:17:20 matthew Exp $ */ +/* $OpenBSD: db_dwarf.c,v 1.2 2015/07/07 19:31:02 matthew Exp $ */ /* * Copyright (c) 2014 Matthew Dempsky <matthew@dempsky.org> * @@ -378,7 +378,7 @@ next: /* Return the last entry. */ *outline = last_line; return (read_filename(&names, outdirname, - outbasename, opcode_base, file)); + outbasename, opcode_base, last_file)); } last_file = file; |