Skip to content

Commit

Permalink
-Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-gomez-windhover committed Oct 11, 2024
1 parent 477550a commit 883c52f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/Artifact.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <cstdint>
#include <string>
#include <cstdint>

class ElfFile;

Expand Down
21 changes: 6 additions & 15 deletions src/Juicer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ Symbol *Juicer::process_DW_TAG_pointer_type(ElfFile &elf, Dwarf_Debug dbg, Dwarf
* This is just a theory, however. In the future we may revisit this
* to figure out the root cause of this.
*
*/
*/

// As per the DWARF; pointer types do not have any "DECL" attributes, aka declaration coords (line numbers, declaration files, etc).
Artifact newArtifact{elf, "NOT_FOUND:" + name};
Expand Down Expand Up @@ -1326,9 +1326,8 @@ Symbol *Juicer::getBaseTypeSymbol(ElfFile &elf, Dwarf_Die inDie, DimensionList &
}

case DW_TAG_union_type:

{

{
Dwarf_Bool structHasName = false;
Dwarf_Bool parentHasName = false;
Dwarf_Unsigned byteSize = 0;
Expand Down Expand Up @@ -1365,10 +1364,7 @@ Symbol *Juicer::getBaseTypeSymbol(ElfFile &elf, Dwarf_Die inDie, DimensionList &
}
}




if (res == DW_DLV_OK)
if (res == DW_DLV_OK)
{
res = dwarf_bytesize(typeDie, &byteSize, &error);
if (res != DW_DLV_OK)
Expand Down Expand Up @@ -1413,12 +1409,12 @@ Symbol *Juicer::getBaseTypeSymbol(ElfFile &elf, Dwarf_Die inDie, DimensionList &
{
/**
* Why we are checking against 0 as per DWARF section 2.14:
*
*
* The value of the DW_AT_decl_file attribute corresponds to a file number from the line number
* information table for the compilation unit containing the debugging information entry and
* represents the source file in which the declaration appeared (see Section 6.2 ). The value 0
* indicates that no source file has been specified.
*
*
*/
Artifact newArtifact{elf, getdbgSourceFile(elf, pathIndex)};
std::string checkSum = generateMD5SumForFile(newArtifact.getFilePath());
Expand All @@ -1438,9 +1434,7 @@ Symbol *Juicer::getBaseTypeSymbol(ElfFile &elf, Dwarf_Die inDie, DimensionList &
{
// process_DW_TAG_structure_type(elf, *outSymbol, dbg, typeDie);
}
}


}

/* TODO */
// outSymbol = process_DW_TAG_base_type(elf, dbg, typeDie);
Expand Down Expand Up @@ -3596,9 +3590,6 @@ Symbol *Juicer::process_DW_TAG_typedef(ElfFile &elf, Dwarf_Debug dbg, Dwarf_Die

res = dwarf_attr(inDie, DW_AT_decl_file, &attr_struct, &error);




if (DW_DLV_OK == res)
{
unsigned long long pathIndex = 0;
Expand Down

0 comments on commit 883c52f

Please sign in to comment.