blob: 98cc9ba907614df2c807420535bee57f9684ce05 [file] [log] [blame]
Brad Bishop2d39a062019-10-28 08:33:36 -04001From 5226333bddb755dbefd780d31450e0238dd5d3bd Mon Sep 17 00:00:00 2001
2From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
3Date: Wed, 16 Oct 2019 08:24:23 +0900
4Subject: [PATCH] Bug fix for data type length judgment.
5
6...
7if (byte_size == sizeof(long)) {
8
9 *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG;
10
11 return true;
12
13}
14...
15
16If ltrace's target command has a dbg package, ltrace will look for the debug file and analyze its contents.
17Ltrace determines the type of analysis result variable. The type of the variable is longlong.
18On 32-bit systems, longlong is 8 and long is 4 (same as in).
19An error occurred because the ltrace code did not process a variable of length 8.
20
21Upstream-Status: Pending
22Signed-off-by: Wang Mingyu <wangmy.fnst@cn.fujitsu.com>
23---
24 dwarf_prototypes.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c
28index bfac177..9887d4b 100644
29--- a/dwarf_prototypes.c
30+++ b/dwarf_prototypes.c
31@@ -190,7 +190,7 @@ static bool get_integer_base_type(enum arg_type *type, int byte_size,
32 return true;
33 }
34
35- if (byte_size == sizeof(long)) {
36+ if (byte_size == sizeof(long long)) {
37 *type = is_signed ? ARGTYPE_LONG : ARGTYPE_ULONG;
38 return true;
39 }
40--
412.7.4
42