@@ -181,7 +181,7 @@ void OIDebugger::dumpRegs(const char* text,
181181 */
182182bool OIDebugger::singleStepFunc (pid_t pid, uint64_t real_end) {
183183 uint64_t addr = 0x0 ;
184- struct user_regs_struct regs {};
184+ struct user_regs_struct regs{};
185185 uint64_t prev = 0 ;
186186
187187 do {
@@ -816,7 +816,7 @@ OIDebugger::processTrapRet OIDebugger::processJitCodeRet(
816816
817817 if (VLOG_IS_ON (4 )) {
818818 errno = 0 ;
819- struct user_regs_struct newregs {};
819+ struct user_regs_struct newregs{};
820820 if (ptrace (PTRACE_GETREGS, pid, NULL , &newregs) < 0 ) {
821821 LOG (ERROR) << " Execute: Couldn't restore registers: "
822822 << strerror (errno);
@@ -875,14 +875,14 @@ bool OIDebugger::processGlobal(const std::string& varName) {
875875 }
876876
877877 errno = 0 ;
878- struct user_regs_struct regs {};
878+ struct user_regs_struct regs{};
879879 if (ptrace (PTRACE_GETREGS, traceePid, nullptr , ®s) < 0 ) {
880880 LOG (ERROR) << " processGlobal: failed to read registers" << strerror (errno);
881881 return false ;
882882 }
883883
884884 errno = 0 ;
885- struct user_fpregs_struct fpregs {};
885+ struct user_fpregs_struct fpregs{};
886886 if (ptrace (PTRACE_GETFPREGS, traceePid, nullptr , &fpregs) < 0 ) {
887887 LOG (ERROR) << " processGlobal: Couldn't get fp registers: "
888888 << strerror (errno);
@@ -1109,7 +1109,7 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
11091109 case SIGSEGV: {
11101110 {
11111111 errno = 0 ;
1112- struct user_regs_struct regs {};
1112+ struct user_regs_struct regs{};
11131113 if (ptrace (PTRACE_GETREGS, newpid, nullptr , ®s) < 0 ) {
11141114 LOG (ERROR) << " SIGSEGV handling: failed to read registers"
11151115 << strerror (errno);
@@ -1175,8 +1175,8 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
11751175 * entry/return point vectoring. We therefore must be able to match
11761176 * which interrupt this is for and act accordingly.
11771177 */
1178- struct user_regs_struct regs {};
1179- struct user_fpregs_struct fpregs {};
1178+ struct user_regs_struct regs{};
1179+ struct user_fpregs_struct fpregs{};
11801180
11811181 errno = 0 ;
11821182 if (ptrace (PTRACE_GETREGS, newpid, nullptr , ®s) < 0 ) {
@@ -1599,15 +1599,15 @@ std::optional<typename Sys::RetType> OIDebugger::remoteSyscall(Args... _args) {
15991599
16001600 /* Saving current registers states */
16011601 errno = 0 ;
1602- struct user_regs_struct oldregs {};
1602+ struct user_regs_struct oldregs{};
16031603 if (ptrace (PTRACE_GETREGS, traceePid, nullptr , &oldregs) < 0 ) {
16041604 LOG (ERROR) << " syscall: GETREGS failed for process " << traceePid << " : "
16051605 << strerror (errno);
16061606 return std::nullopt ;
16071607 }
16081608
16091609 errno = 0 ;
1610- struct user_fpregs_struct oldfpregs {};
1610+ struct user_fpregs_struct oldfpregs{};
16111611 if (ptrace (PTRACE_GETFPREGS, traceePid, nullptr , &oldfpregs) < 0 ) {
16121612 LOG (ERROR) << " syscall: GETFPREGS failed for process " << traceePid << " : "
16131613 << strerror (errno);
@@ -2485,7 +2485,7 @@ void OIDebugger::restoreState(void) {
24852485 continue ;
24862486 }
24872487
2488- struct user_regs_struct regs {};
2488+ struct user_regs_struct regs{};
24892489
24902490 /* Find the trapInfo for this tgid */
24912491 if (auto iter{threadTrapState.find (p)};
@@ -2495,7 +2495,7 @@ void OIDebugger::restoreState(void) {
24952495 /* Paranoia really */
24962496 assert (p == iter->first );
24972497
2498- struct user_fpregs_struct fpregs {};
2498+ struct user_fpregs_struct fpregs{};
24992499
25002500 if (VLOG_IS_ON (1 )) {
25012501 errno = 0 ;
@@ -2573,7 +2573,7 @@ void OIDebugger::restoreState(void) {
25732573
25742574 if (VLOG_IS_ON (1 )) {
25752575 errno = 0 ;
2576- struct user_regs_struct regs {};
2576+ struct user_regs_struct regs{};
25772577 if (ptrace (PTRACE_GETREGS, p, NULL , ®s) < 0 ) {
25782578 LOG (ERROR) << " restoreState unknown sig handling: getregs failed- "
25792579 << strerror (errno);
@@ -2708,7 +2708,7 @@ bool OIDebugger::stopTarget(void) {
27082708
27092709 if (VLOG_IS_ON (1 )) {
27102710 errno = 0 ;
2711- struct user_regs_struct stopregs {};
2711+ struct user_regs_struct stopregs{};
27122712 if (ptrace (PTRACE_GETREGS, traceePid, NULL , &stopregs) < 0 ) {
27132713 LOG (ERROR) << " stopTarget getregs failed for process " << traceePid
27142714 << " : " << strerror (errno);
0 commit comments