Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mkisielewski-arista authored and peadar committed Jan 21, 2025
1 parent 5b5c8a5 commit 7ddd29a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dwarf_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ CFI::CFI(const Info *info, FIType type_)
do {

// If we are using .eh_frame and have .eh_frame_hdr, we can use
// the sorted header later to read the FDEs lazily.
// the sorted header later to read the FDEs lazily.
if ( type != FI_EH_FRAME )
break;
if (!ehFrameHdrSec)
Expand Down
4 changes: 2 additions & 2 deletions libpstack/dwarf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class LineInfo;
class Unit;
class CFI;
struct CIE;
}
}

namespace pstack {

Expand Down Expand Up @@ -222,7 +222,7 @@ class DIE {
++rawIter;
return *this;
}
const_iterator(const DIE &die_, Abbreviation::AttrNameMap::const_iterator rawIter_) :
const_iterator(const DIE &die_, Abbreviation::AttrNameMap::const_iterator rawIter_) :
die(die_), rawIter(rawIter_) {}
bool operator == (const const_iterator &rhs) const {
return rawIter == rhs.rawIter;
Expand Down
2 changes: 1 addition & 1 deletion libpstack/reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class OffsetReader final : public Reader {
};

// This allows a reader to provide an iterator over a sequence of objects of a
// given type. Given a reader r, we can use
// given type. Given a reader r, we can use
// for (const Foo &foo : ReaderArray<Foo>(r)) {
// ...
// }
Expand Down
2 changes: 1 addition & 1 deletion process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ PrintableFrame::PrintableFrame(Process &proc, const StackFrame &frame)
}

Dwarf::DIE removeCV(Dwarf::DIE type) {
while (type &&
while (type &&
(type.tag() == Dwarf::DW_TAG_typedef
|| type.tag() == Dwarf::DW_TAG_const_type
|| type.tag() == Dwarf::DW_TAG_volatile_type))
Expand Down
2 changes: 1 addition & 1 deletion pstack.1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ or from the core file
.Pp
Normal invocation prints the stack trace from a core file or running
process. This implementation understands the stack unwinding data in eh_frame
sections, and properly unwinds through stack frames of code compiled with
sections, and properly unwinds through stack frames of code compiled with
.Em -fomit-frame-pointer
and on x86_64
.Pp
Expand Down
2 changes: 1 addition & 1 deletion pstack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ doPy(Procman::Process &proc, bool showModules, const PyInterpInfo &info) {
* @brief Given a process, tries to print the Python strack trace of it.
* If the process wasn't a Python process, returns false.
* True on successful printing of Python stack trace
*
*
* @param proc The process
* @param o The stream to which to print the otutput
* @param options Options
Expand Down
4 changes: 2 additions & 2 deletions python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ getPyInterpInfo(Procman::Process &proc) {
*proc.context.debug << "python version is: " << major << "." << minor << std::endl;

return PyInterpInfo {
libpython, libpythonAddr, interpreterHead,
libpython, libpythonAddr, interpreterHead,
"v" + std::to_string(major) + "." + std::to_string(minor),
V2HEX(major, minor)};
}
Expand All @@ -51,7 +51,7 @@ getInterpHead(Procman::Process &proc) {
// (Python3 does not require this hack, because _PyRuntime is exported
// in the dynamic symbols.)
try {
auto [ libpython, libpythonAddr, interpreterHead ] =
auto [ libpython, libpythonAddr, interpreterHead ] =
proc.resolveSymbolDetail("Py_interp_headp", false,
[&](std::string_view name) {
return name.find("python") != std::string::npos;
Expand Down
2 changes: 1 addition & 1 deletion python.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ PythonPrinter<PyV>::print(Elf::Addr remoteAddr) const {
}

/*
* process one python thread in an interpreter, at remote addr "ptr".
* process one python thread in an interpreter, at remote addr "ptr".
* returns the address of the next thread on the list.
*/
template <int PyV>
Expand Down
6 changes: 3 additions & 3 deletions python2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ template<> char PythonTypePrinter<2>::pyBytesType[] = "PyString_Type";

/**
* @brief Reads a Python2 string
*
*
* @param r The reader used
* @param addr Address of PyStringObject
* @return std::string
* @return std::string
*/
template <> std::string readString<2>(const Reader &r, const Elf::Addr addr) {
return r.readString(addr + offsetof(PyBytesObject, ob_sval));
Expand Down Expand Up @@ -53,7 +53,7 @@ class DictPrinter final : public PythonTypePrinter<2> {
pc->os << "{}";
return 0;
}

if (pc->depth > pc->proc.context.options.maxdepth) {
pc->os << "{ ... }";
return 0;
Expand Down
4 changes: 2 additions & 2 deletions python3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ char PythonTypePrinter<3>::pyBytesType[] = "PyUnicode_Type";

/**
* @brief Converts a Python PyASCIIObject, PyCompactUnicodeObject or PyUnicodeObjec to a string
*
*
* @param r The reader used
* @param addr Address of the object
* @return std::string
* @return std::string
*/
template <> std::string readString<3>(const Reader &r, const Elf::Addr addr) {
PyASCIIObject baseObj = r.readObj<PyASCIIObject>(addr);
Expand Down
2 changes: 1 addition & 1 deletion smol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ main()
auto [ lib, addr, sym ] = p->resolveSymbolDetail("foobar", true);
std::cout << "found foobar in " << *lib->io << "@" << addr << ", value=" << sym.st_value << ", size=" << sym.st_size << std::endl;
std::cout << "match? " << (Elf::Addr(foobar) == addr + sym.st_value) << std::endl;

return foobar();
}
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SET_TARGET_PROPERTIES(noreturn PROPERTIES COMPILE_FLAGS "-O2 -g")


add_custom_command(
OUTPUT basic-no-unwind-gen
OUTPUT basic-no-unwind-gen
COMMAND objcopy --strip-debug --remove-section .eh_frame basic basic-no-unwind
VERBATIM )

Expand Down

0 comments on commit 7ddd29a

Please sign in to comment.