summaryrefslogtreecommitdiffstats
path: root/usr.bin/ctfconv
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-09-27 08:59:38 +0000
committermpi <mpi@openbsd.org>2017-09-27 08:59:38 +0000
commitc4534afaed8f90e1555ed3548f7799a954a3446f (patch)
treea0eaad110cc678a6c0039d893ac11e6c9120fc53 /usr.bin/ctfconv
parenttweak EposeAuthinfo; (diff)
downloadwireguard-openbsd-c4534afaed8f90e1555ed3548f7799a954a3446f.tar.xz
wireguard-openbsd-c4534afaed8f90e1555ed3548f7799a954a3446f.zip
Unserstand DW_OP_bregN locations.
Sync with readdwarf(1).
Diffstat (limited to 'usr.bin/ctfconv')
-rw-r--r--usr.bin/ctfconv/dw.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/ctfconv/dw.c b/usr.bin/ctfconv/dw.c
index cf015561186..375970864d2 100644
--- a/usr.bin/ctfconv/dw.c
+++ b/usr.bin/ctfconv/dw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dw.c,v 1.3 2017/09/04 12:56:01 anton Exp $ */
+/* $OpenBSD: dw.c,v 1.4 2017/09/27 08:59:38 mpi Exp $ */
/*
* Copyright (c) 2016 Martin Pieuchot
@@ -648,9 +648,18 @@ dw_loc_parse(struct dwbuf *dwbuf, uint8_t *pop, uint64_t *poper1,
*pop = op;
switch (op) {
+ case DW_OP_constu:
case DW_OP_plus_uconst:
+ case DW_OP_regx:
+ case DW_OP_piece:
dw_read_uleb128(dwbuf, &oper1);
break;
+
+ case DW_OP_consts:
+ case DW_OP_breg0 ... DW_OP_breg31:
+ case DW_OP_fbreg:
+ dw_read_sleb128(dwbuf, &oper1);
+ break;
default:
return ENOTSUP;
}