diff options
| author | Jason Molenda <jmolenda@apple.com> | 2013-04-03 04:31:59 +0000 | 
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2013-04-03 04:31:59 +0000 | 
| commit | 69535e007271d606b4b6e87edbfff39aa64a6702 (patch) | |
| tree | 095296bf63ed28383e2bbcc18868985a9ab3f08c | |
| parent | d5318c0c35354b22b9b676b9e2bc7076306a3d08 (diff) | |
| download | bcm5719-llvm-69535e007271d606b4b6e87edbfff39aa64a6702.tar.gz bcm5719-llvm-69535e007271d606b4b6e87edbfff39aa64a6702.zip | |
Remove a bit of code duplication in RNBRemote::HandlePacket_qProcessInfo -
call DNBProcessGetCPUType() to get the cputype of the process we're debugging.
llvm-svn: 178620
| -rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 14 | 
1 files changed, 3 insertions, 11 deletions
| diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 35d960b8e3a..e530bff024b 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -4054,18 +4054,10 @@ RNBRemote::HandlePacket_qProcessInfo (const char *p)          }      } -    int cputype_mib[CTL_MAXNAME]={0,}; -    size_t cputype_mib_len = CTL_MAXNAME; -    cpu_type_t cputype = -1; -    if (::sysctlnametomib("sysctl.proc_cputype", cputype_mib, &cputype_mib_len) == 0) +    cpu_type_t cputype = DNBProcessGetCPUType (pid); +    if (cputype != 0)      { -        cputype_mib[cputype_mib_len] = pid; -        cputype_mib_len++; -        size_t len = sizeof(cputype); -        if (::sysctl (cputype_mib, cputype_mib_len, &cputype, &len, 0, 0) == 0) -        { -            rep << "cputype:" << std::hex << cputype << ";"; -        } +        rep << "cputype:" << std::hex << cputype << ";";      }      uint32_t cpusubtype; | 

