@@ -181,7 +181,7 @@ void OIDebugger::dumpRegs(const char* text,
181
181
*/
182
182
bool OIDebugger::singleStepFunc (pid_t pid, uint64_t real_end) {
183
183
uint64_t addr = 0x0 ;
184
- struct user_regs_struct regs {};
184
+ struct user_regs_struct regs{};
185
185
uint64_t prev = 0 ;
186
186
187
187
do {
@@ -816,7 +816,7 @@ OIDebugger::processTrapRet OIDebugger::processJitCodeRet(
816
816
817
817
if (VLOG_IS_ON (4 )) {
818
818
errno = 0 ;
819
- struct user_regs_struct newregs {};
819
+ struct user_regs_struct newregs{};
820
820
if (ptrace (PTRACE_GETREGS, pid, NULL , &newregs) < 0 ) {
821
821
LOG (ERROR) << " Execute: Couldn't restore registers: "
822
822
<< strerror (errno);
@@ -875,14 +875,14 @@ bool OIDebugger::processGlobal(const std::string& varName) {
875
875
}
876
876
877
877
errno = 0 ;
878
- struct user_regs_struct regs {};
878
+ struct user_regs_struct regs{};
879
879
if (ptrace (PTRACE_GETREGS, traceePid, nullptr , ®s) < 0 ) {
880
880
LOG (ERROR) << " processGlobal: failed to read registers" << strerror (errno);
881
881
return false ;
882
882
}
883
883
884
884
errno = 0 ;
885
- struct user_fpregs_struct fpregs {};
885
+ struct user_fpregs_struct fpregs{};
886
886
if (ptrace (PTRACE_GETFPREGS, traceePid, nullptr , &fpregs) < 0 ) {
887
887
LOG (ERROR) << " processGlobal: Couldn't get fp registers: "
888
888
<< strerror (errno);
@@ -1109,7 +1109,7 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
1109
1109
case SIGSEGV: {
1110
1110
{
1111
1111
errno = 0 ;
1112
- struct user_regs_struct regs {};
1112
+ struct user_regs_struct regs{};
1113
1113
if (ptrace (PTRACE_GETREGS, newpid, nullptr , ®s) < 0 ) {
1114
1114
LOG (ERROR) << " SIGSEGV handling: failed to read registers"
1115
1115
<< strerror (errno);
@@ -1175,8 +1175,8 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
1175
1175
* entry/return point vectoring. We therefore must be able to match
1176
1176
* which interrupt this is for and act accordingly.
1177
1177
*/
1178
- struct user_regs_struct regs {};
1179
- struct user_fpregs_struct fpregs {};
1178
+ struct user_regs_struct regs{};
1179
+ struct user_fpregs_struct fpregs{};
1180
1180
1181
1181
errno = 0 ;
1182
1182
if (ptrace (PTRACE_GETREGS, newpid, nullptr , ®s) < 0 ) {
@@ -1599,15 +1599,15 @@ std::optional<typename Sys::RetType> OIDebugger::remoteSyscall(Args... _args) {
1599
1599
1600
1600
/* Saving current registers states */
1601
1601
errno = 0 ;
1602
- struct user_regs_struct oldregs {};
1602
+ struct user_regs_struct oldregs{};
1603
1603
if (ptrace (PTRACE_GETREGS, traceePid, nullptr , &oldregs) < 0 ) {
1604
1604
LOG (ERROR) << " syscall: GETREGS failed for process " << traceePid << " : "
1605
1605
<< strerror (errno);
1606
1606
return std::nullopt ;
1607
1607
}
1608
1608
1609
1609
errno = 0 ;
1610
- struct user_fpregs_struct oldfpregs {};
1610
+ struct user_fpregs_struct oldfpregs{};
1611
1611
if (ptrace (PTRACE_GETFPREGS, traceePid, nullptr , &oldfpregs) < 0 ) {
1612
1612
LOG (ERROR) << " syscall: GETFPREGS failed for process " << traceePid << " : "
1613
1613
<< strerror (errno);
@@ -2485,7 +2485,7 @@ void OIDebugger::restoreState(void) {
2485
2485
continue ;
2486
2486
}
2487
2487
2488
- struct user_regs_struct regs {};
2488
+ struct user_regs_struct regs{};
2489
2489
2490
2490
/* Find the trapInfo for this tgid */
2491
2491
if (auto iter{threadTrapState.find (p)};
@@ -2495,7 +2495,7 @@ void OIDebugger::restoreState(void) {
2495
2495
/* Paranoia really */
2496
2496
assert (p == iter->first );
2497
2497
2498
- struct user_fpregs_struct fpregs {};
2498
+ struct user_fpregs_struct fpregs{};
2499
2499
2500
2500
if (VLOG_IS_ON (1 )) {
2501
2501
errno = 0 ;
@@ -2573,7 +2573,7 @@ void OIDebugger::restoreState(void) {
2573
2573
2574
2574
if (VLOG_IS_ON (1 )) {
2575
2575
errno = 0 ;
2576
- struct user_regs_struct regs {};
2576
+ struct user_regs_struct regs{};
2577
2577
if (ptrace (PTRACE_GETREGS, p, NULL , ®s) < 0 ) {
2578
2578
LOG (ERROR) << " restoreState unknown sig handling: getregs failed- "
2579
2579
<< strerror (errno);
@@ -2708,7 +2708,7 @@ bool OIDebugger::stopTarget(void) {
2708
2708
2709
2709
if (VLOG_IS_ON (1 )) {
2710
2710
errno = 0 ;
2711
- struct user_regs_struct stopregs {};
2711
+ struct user_regs_struct stopregs{};
2712
2712
if (ptrace (PTRACE_GETREGS, traceePid, NULL , &stopregs) < 0 ) {
2713
2713
LOG (ERROR) << " stopTarget getregs failed for process " << traceePid
2714
2714
<< " : " << strerror (errno);
0 commit comments