Closed
Bug 661660
Opened 14 years ago
Closed 12 years ago
Add offset information for members of classes/structures in dehydra.
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: thesamprice, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier:
Packed, and unpacked variables can have different sizes, and different offset characteristics depending on a members attributes. While this can manually be calculated, I feel dehydra should generate this data also.
Example:
struct test{
char a;
int b;
} __attribute__ ((packed));
struct test2{
char a;
int b;
};
sizeof(test) == 5
sizeof(test2) == 8
Makes it difficult to line up the addresses without re-parsing the data and looking for the packed field.
Reproducible: Always
Steps to Reproduce:
Example:
struct test{
char a;
int b;
} __attribute__ ((packed));
struct test2{
char a;
int b;
};
sizeof(test) == 5
sizeof(test2) == 8
Actual Results:
PARAM: c
#1= {
kind: "struct",
name: "test",
members: [{
shortName: "a",
name: "test::a",
access: "public",
memberOf: "See Type #1",
type: #2={
min: {
value: "-128",
type: "See Type #2"
},
max: {
value: "127",
type: "See Type #2"
},
isSigned: true,
precision: 8,
name: "char"
},
loc: {
_source_location: 222,
file: "/tmp/tmpHAWCbs.cpp",
line: 2,
column: 6
}
},
{
shortName: "b",
name: "test::b",
access: "public",
memberOf: "See Type #1",
type: #3={
min: {
value: "-2147483648",
type: "See Type #3"
},
max: {
value: "2147483647",
type: "See Type #3"
},
isSigned: true,
precision: 32,
name: "int"
},
loc: {
_source_location: 349,
file: "/tmp/tmpHAWCbs.cpp",
line: 3,
column: 5
}
}],
size_of: 5,
loc: {
_source_location: 100,
file: "/tmp/tmpHAWCbs.cpp",
line: 1,
column: 12
},
attributes: [{
name: "packed",
value: []
}]
}
PARAM: c
#1= {
kind: "struct",
name: "test2",
members: [{
shortName: "a",
name: "test2::a",
access: "public",
memberOf: "See Type #1",
type: #2={
min: {
value: "-128",
type: "See Type #2"
},
max: {
value: "127",
type: "See Type #2"
},
isSigned: true,
precision: 8,
name: "char"
},
loc: {
_source_location: 862,
file: "/tmp/tmpHAWCbs.cpp",
line: 7,
column: 6
}
},
{
shortName: "b",
name: "test2::b",
access: "public",
memberOf: "See Type #1",
type: #3={
min: {
value: "-2147483648",
type: "See Type #3"
},
max: {
value: "2147483647",
type: "See Type #3"
},
isSigned: true,
precision: 32,
name: "int"
},
loc: {
_source_location: 989,
file: "/tmp/tmpHAWCbs.cpp",
line: 8,
column: 5
}
}],
size_of: 8,
loc: {
_source_location: 741,
file: "/tmp/tmpHAWCbs.cpp",
line: 6,
column: 13
}
}
Expected Results:
shortName: "a",
offset = 0x0,
shortName: "b",
offset = 0x1 or offset = 0x4
Updated•14 years ago
|
Version: unspecified → 2.0 Branch
Comment 1•12 years ago
|
||
Dehydra and treehydra are no longer maintained by Mozilla.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•