Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-10-02 | On i386 long double is 80bit expanded to 96bits or 12 bytes. This is the | Claudio Jeker | |
size that the ctftools ctfconvert uses and I think we should do as well. Fixes regress/usr.bin/ctfdump on i386. OK miod@ | |||
2024-02-27 | Recent ctfconv refactoring broke support for long double types, as | Anton Lindqvist | |
discovered by the regress tests. | |||
2024-02-22 | Rewrite the it_cmp() function to use the common check bigger than, check | Claudio Jeker | |
smaller than logic. There was a bug in this code because of a badly placed ) which I only noticed after rewriting the function since I assumed that C integer promotion is playing tricks with us. OK mpi@ | |||
2024-02-22 | The ctt_size of integers and floating point numbers is in bytes not bits. | Claudio Jeker | |
OK mpi@ | |||
2024-02-21 | In it_cmp() make sure that arrays are only considered equal if both | Claudio Jeker | |
have the same number of elements. This fixes an issue where arrays where too aggressivly merged and as a result the number of elements was mostly wrong in the CTF bits. Also it_cmp() should return 0 if both elements are considered equal. OK mpi@ | |||
2024-02-21 | Make DPRINTF() depend on DEBUG and add the missing ; | Claudio Jeker | |
OK mpi@ | |||
2024-02-21 | Apply the void workaround also for typedefs. | Claudio Jeker | |
The kernel has 'typedef VOID void' which needs this. OK mpi@ | |||
2024-02-21 | Handle DW_FORM_udata and DW_FORM_ref_udata in dav2val(). | Claudio Jeker | |
At least with clang enums use DW_FORM_udata and without this all enum values would be reported as -1. OK mpi@ | |||
2024-02-21 | Make sure dw_at2name() never returns NULL. This call is used in various | Claudio Jeker | |
printf calls that clang decided to optimise into puts calls that crash with a NULL argument. Also add DW_AT_noreturn which caused this when running ./ctfconv -d ./ctfconv OK mpi@ | |||
2023-04-19 | remove duplicate includes | Jonathan Gray | |
2022-12-26 | revert previous: just as i get to replying, i find sthen's note. this part | Jason McIntyre | |
of the diff is not for me. | |||
2022-12-26 | emited -> emitted; | Jason McIntyre | |
from paul tagliamonte | |||
2022-10-02 | Remove unused DEBUG_LINE define. | Martin Pieuchot | |
2022-08-14 | Use size_t, not off_t, for length parameters. | Todd C. Miller | |
This matches how the functions are called and eliminates a few casts. OK tb@ | |||
2021-10-25 | Zap unused variables/functions under /usr/src/*bin/ | Klemens Nanni | |
OK deraadt | |||
2021-07-12 | Change the error reporting pattern throughout the tree when unveil | Bob Beck | |
fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion. Work done and verified by Ashton Fagg <ashton@fagg.id.au> ok deraadt@ semarie@ claudio@ | |||
2019-11-11 | Typo. | Martin Pieuchot | |
From Mark Johnston, markj@FreeBSD | |||
2019-11-07 | Don't stop parsing functions when variables are declared before arguments. | Martin Pieuchot | |
Fix argument types of functions containing a static variable when compiled with clang(1). | |||
2019-11-07 | Do a better job at guessing the name of localy defined static variables. | Martin Pieuchot | |
Handle the "varname.id" schema used by gcc(1) and "funcname.varname" used by clang(1). Fix a shadowing issue with clang(1). | |||
2019-11-07 | Stop remembering the type of local variables. | Martin Pieuchot | |
Fix a shadowing issue reported by procter@. | |||
2019-10-15 | Include the .SUNW_ctf section in bsd.gdb | Martin Pieuchot | |
Once the section has been built from the DWARF symbols also add it to the debug kernel. That makes ddb(4) print the correct number of args in function backtraces in such kernel as well. While here make comment fit in 80 columns. ok jasper@ | |||
2019-05-27 | Use getopts instead of getopt(1) | Jeremie Courreges-Anglas | |
getopts is a standard shell builtin (POSIX) and lets you handle whitespace in parameters. ok mpi@ sunil@ | |||
2019-02-18 | Using getopt(1) is more idiomatic and consistent with other scripts. | Sunil Nimmagadda | |
Ok mpi@ | |||
2019-02-18 | Fix in-place stripping by using correct form of parameter substitution. | Sunil Nimmagadda | |
Ok mpi@ | |||
2018-08-08 | add unveil(2) to ctfconv(1) | Ricardo Mestre | |
Once we know what the input file is, usually /bsd.gdb, we can unveil it in read mode. If we also define as argument an output file we can additionally unveil that one with write/create permissions. We don't need to care about calling unveil(NULL, NULL) since we can call pledge(2) and reduce the permissions down the road depending on the code path. "reads OK" jasper@, "put it in if works" mpi@ prodded by deraadt@ | |||
2018-01-31 | Consider integer/float size during base type comparisons. | Martin Pieuchot | |
Regression introduced when I added support for merging forward declarations with their corresponding types because they do not have a size. | |||
2017-11-14 | Verify that every section header lies within the mapped file. | Martin Pieuchot | |
Pointed out by Mark Johnston, Markj@FreeBSD | |||
2017-11-06 | Use the symtab's sh_link to get the string table section. | Martin Pieuchot | |
This is technically more correct than looking for ".strtab" and allows us to get rid of unportable ELF_STRTAB. We can also get rid of the hack for some incorrect ELF files since we no longer try to apply relocations for the string table. From Mark Johnston, markj@FreeBSD | |||
2017-11-03 | Make dump_itype() dump enum members. | Martin Pieuchot | |
From Mark Johnston, markj@FreeBSD | |||
2017-11-03 | Fix a format string warning in dump_type(). | Martin Pieuchot | |
From Mark Johnston, markj@FreeBSD | |||
2017-10-31 | Merge type forward declarations with real ones as soon as they are found. | Martin Pieuchot | |
2017-10-28 | Document the use of a rbtree for resolving types inside a single CU. | Martin Pieuchot | |
No functional changes. | |||
2017-10-28 | Define nitems() locally and stop including <sys/param.h> | Martin Pieuchot | |
2017-10-27 | Use <elf.h> rather than <sys/exec_elf.h>. | Martin Pieuchot | |
The former is more portable. | |||
2017-10-17 | add missing HISTORY; based on CVS logs and release announcements | Ingo Schwarze | |
2017-09-30 | Add some more boundary checks and prevent an attempt to divide by zero | Jonathan Gray | |
to resolve some additional crashes found by afl. ok mpi@ deraadt@ | |||
2017-09-29 | Check that the end of sections do not exceed the filesize for both | Jonathan Gray | |
symtab and sections. Corrects behaviour that led to crashes found via afl. ok mpi@ | |||
2017-09-29 | Do not segfault when the string table is invalid or not present. | Martin Pieuchot | |
Based on a diff from jsg@. Found independently by jsg@ with afl and markj@FreeBSD with a port. | |||
2017-09-27 | Unserstand DW_OP_bregN locations. | Martin Pieuchot | |
Sync with readdwarf(1). | |||
2017-09-26 | Ignore file offset values in section headers that exceed the length of | Jonathan Gray | |
the file. Avoids a crash found with afl. ok mpi@ | |||
2017-09-26 | Return the correct error value in generate(). | Martin Pieuchot | |
From Mark Johnston, markj@FreeBSD | |||
2017-09-24 | Handle parse_base() returning NULL for DW_TAG_base_type to avoid | Jonathan Gray | |
attemping to insert a NULL iterator leading to a NULL deref crash. Found with afl. ok mpi@ | |||
2017-09-24 | Ignore DW_FORM_strp with size larger than elf section buffer | Jonathan Gray | |
fixes accessing memory out of bounds that led to a segfault. Found with afl. ok mpi@ | |||
2017-09-19 | fix fd leaks in error paths | Jonathan Gray | |
ok mpi@ | |||
2017-09-04 | Fix typo in comment; ok mpi@ | anton | |
2017-08-29 | quarterly rescan of the tree: remove unneccessary sys/param.h, and | Theo de Raadt | |
annotate the ones which are needed. | |||
2017-08-28 | spelling/grammar fixes; | Jason McIntyre | |
2017-08-15 | proper fix for previous and add missing quotes | Jasper Lievisse Adriaanse | |
from tb@ ok visa@ mpi@ | |||
2017-08-14 | simplify LABEL extraction; from tb@ | Jasper Lievisse Adriaanse | |
2017-08-13 | Fix arguments that are passed to strip(1). In particular, | Visa Hankala | |
$INFILE should not appear twice. OK mpi@, jasper@ |