A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use string::compare with C++ strings.
[simgrid.git]
/
src
/
mc
/
mc_dwarf.cpp
diff --git
a/src/mc/mc_dwarf.cpp
b/src/mc/mc_dwarf.cpp
index
59655e8
..
ec22c9a
100644
(file)
--- a/
src/mc/mc_dwarf.cpp
+++ b/
src/mc/mc_dwarf.cpp
@@
-447,7
+447,7
@@
static uint64_t MC_dwarf_array_element_count(Dwarf_Die * die, Dwarf_Die * unit)
static bool MC_compare_variable(
simgrid::mc::Variable const& a, simgrid::mc::Variable const& b)
{
static bool MC_compare_variable(
simgrid::mc::Variable const& a, simgrid::mc::Variable const& b)
{
- int cmp =
strcmp(a.name.c_str(), b.name.c_str()
);
+ int cmp =
a.name.compare(b.name
);
if (cmp < 0)
return true;
else if (cmp > 0)
if (cmp < 0)
return true;
else if (cmp > 0)
@@
-774,8
+774,8
@@
static std::unique_ptr<simgrid::mc::Variable> MC_die_to_variable(simgrid::mc::Ob
if (dwarf_hasattr(die, DW_AT_start_scope)) {
Dwarf_Attribute attr;
dwarf_attr(die, DW_AT_start_scope, &attr);
if (dwarf_hasattr(die, DW_AT_start_scope)) {
Dwarf_Attribute attr;
dwarf_attr(die, DW_AT_start_scope, &attr);
-
int form
= dwarf_whatform(&attr);
-
simgrid::dwarf::FormClass
form_class = simgrid::dwarf::classify_form(form);
+
form
= dwarf_whatform(&attr);
+ form_class = simgrid::dwarf::classify_form(form);
if (form_class == simgrid::dwarf::FormClass::Constant) {
Dwarf_Word value;
variable->start_scope = dwarf_formudata(&attr, &value) == 0 ? (size_t)value : 0;
if (form_class == simgrid::dwarf::FormClass::Constant) {
Dwarf_Word value;
variable->start_scope = dwarf_formudata(&attr, &value) == 0 ? (size_t)value : 0;
@@
-1187,7
+1187,7
@@
void MC_load_dwarf(simgrid::mc::ObjectInformation* info)
fd = open(debug_file.c_str(), O_RDONLY);
if (fd < 0)
xbt_die("Could not open file %s", debug_file.c_str());
fd = open(debug_file.c_str(), O_RDONLY);
if (fd < 0)
xbt_die("Could not open file %s", debug_file.c_str());
-
Dwarf*
dwarf = dwarf_begin(fd, DWARF_C_READ);
+ dwarf = dwarf_begin(fd, DWARF_C_READ);
if (dwarf == nullptr)
xbt_die("No DWARF info in %s for %s",
debug_file.c_str(), info->file_name.c_str());
if (dwarf == nullptr)
xbt_die("No DWARF info in %s for %s",
debug_file.c_str(), info->file_name.c_str());
@@
-1327,9
+1327,9
@@
std::shared_ptr<simgrid::mc::ObjectInformation> createObjectInformation(
void postProcessObjectInformation(simgrid::mc::RemoteClient* process, simgrid::mc::ObjectInformation* info)
{
void postProcessObjectInformation(simgrid::mc::RemoteClient* process, simgrid::mc::ObjectInformation* info)
{
- for (auto&
i
: info->types) {
+ for (auto&
t
: info->types) {
- simgrid::mc::Type* type
= &(i
.second);
+ simgrid::mc::Type* type
= &(t
.second);
simgrid::mc::Type* subtype = type;
while (subtype->type == DW_TAG_typedef
|| subtype->type == DW_TAG_volatile_type
simgrid::mc::Type* subtype = type;
while (subtype->type == DW_TAG_typedef
|| subtype->type == DW_TAG_volatile_type