diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-02-02 15:34:08 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2018-02-08 18:21:42 -0600 |
commit | 3a7422851bc345971773c4d22881199b7911da33 (patch) | |
tree | 5e7a5f9817a2aa68e561731986f3c07e1fb7a223 /include/skiboot.h | |
parent | 85a1de35cbe47618e9d4104880f182121806af4d (diff) | |
download | skiboot-3a7422851bc345971773c4d22881199b7911da33.zip skiboot-3a7422851bc345971773c4d22881199b7911da33.tar.gz skiboot-3a7422851bc345971773c4d22881199b7911da33.tar.bz2 |
core/utils: add snprintf_symbol
get_symbol is difficult to use. Add snprintf_symbol helper which
prints a symbol into a buffer with length, and returns the number
of bytes used, similarly to snprintf. Use this in the stack dumping
code rather than open-coding it.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/skiboot.h')
-rw-r--r-- | include/skiboot.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/skiboot.h b/include/skiboot.h index e94f212..fd751dc 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -204,8 +204,7 @@ extern const char version[]; /* Debug support */ extern char __sym_map_start[]; extern char __sym_map_end[]; -extern unsigned long get_symbol(unsigned long addr, - char **sym, char **sym_end); +extern size_t snprintf_symbol(char *buf, size_t len, uint64_t addr); /* Direct controls */ extern void direct_controls_init(void); |