forked from OSchip/llvm-project
Simple fixes for the gdb remote process plugin on Linux.
llvm-svn: 128291
This commit is contained in:
parent
1080edbcdd
commit
a78867b899
|
@ -11,6 +11,8 @@
|
||||||
#include "GDBRemoteCommunication.h"
|
#include "GDBRemoteCommunication.h"
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
// Other libraries and framework includes
|
// Other libraries and framework includes
|
||||||
#include "lldb/Core/Log.h"
|
#include "lldb/Core/Log.h"
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
// C Includes
|
// C Includes
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <spawn.h>
|
#include <spawn.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ using namespace lldb_private;
|
||||||
static inline uint16_t
|
static inline uint16_t
|
||||||
get_random_port ()
|
get_random_port ()
|
||||||
{
|
{
|
||||||
return (arc4random() % (UINT16_MAX - 1000u)) + 1000u;
|
return (rand() % (UINT16_MAX - 1000u)) + 1000u;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue