Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc-debug
  • DavidEichmann/ghc-debug
  • trac-jberryman/ghc-debug
  • zyklotomic/ghc-debug
  • alinab/ghc-debug
  • teo/ghc-debug
  • Kariiem/ghc-debug
  • supersven/ghc-debug
  • wavewave/ghc-debug
  • duog/ghc-debug
  • jhrcek/ghc-debug
  • zliu41/ghc-debug
  • trac-sjoerd_visscher/ghc-debug
  • rmullanix/ghc-debug
  • 4eUeP/ghc-debug
  • tmobile/ghc-debug
  • rwarfield/ghc-debug
17 results
Show changes
Commits on Source (4)
......@@ -32,7 +32,7 @@ convertClosure g =
GHC.MutVarClosure a1 a2 -> MutVarClosure a1 a2
GHC.BlockingQueueClosure a1 a2 a3 a4 a5 -> BlockingQueueClosure a1 a2 a3 a4 a5
GHC.TSOClosure a1 a2 -> TSOClosure a1 a2
GHC.StackClosure a1 a2 a3 a4 a5 -> StackClosure a1 a2 a3 a4 a5
GHC.StackClosure a1 a2 a3 a4 a5 -> StackClosure a1 a2 a3 (StackCont a5 a4)
GHC.IntClosure a1 a2 -> IntClosure a1 a2
GHC.WordClosure a1 a2 -> WordClosure a1 a2
GHC.Int64Closure a1 a2 -> Int64Closure a1 a2
......
......@@ -37,7 +37,7 @@ data Request a where
-- | Request the debuggee's root pointers.
RequestRoots :: Request [ClosurePtr]
-- | Request a set of closures.
RequestClosures :: [ClosurePtr] -> Request [RawClosure]
RequestClosures :: [ClosurePtr] -> Request [(ClosurePtr, RawClosure)]
-- | Request a set of info tables.
RequestInfoTables :: [InfoTablePtr] -> Request [RawInfoTable]
-- | Wait for the debuggee to pause itself and then
......@@ -134,7 +134,7 @@ getResponse RequestVersion = getWord32be
getResponse RequestPause = get
getResponse RequestResume = get
getResponse RequestRoots = many get
getResponse (RequestClosures _) = many getRawClosure
getResponse (RequestClosures cs) = zip cs <$> many getRawClosure
getResponse (RequestInfoTables _) = many getRawInfoTable
getResponse (RequestBitmap _) = getPtrBitmap
getResponse (RequestConstrDesc _) = getConstrDesc
......
......@@ -231,8 +231,7 @@ data DebugClosure string s b
{ info :: !StgInfoTable
, size :: !HalfWord
, dirty :: !HalfWord
, stackPointer :: !s
, stack :: [Word]
, stack :: !s
}
| WeakClosure
......@@ -378,7 +377,7 @@ instance Tritraversable DebugClosure where
BlockingQueueClosure a1 b1 b2 b3 b4 ->
BlockingQueueClosure a1 <$> g b1 <*> g b2 <*> g b3 <*> g b4
TSOClosure a1 b -> TSOClosure a1 <$> g b
StackClosure a1 a2 a3 s1 ss -> StackClosure a1 a2 a3 <$> f s1 <*> pure ss
StackClosure a1 a2 a3 s1 -> StackClosure a1 a2 a3 <$> f s1
WeakClosure a1 a2 a3 a4 a5 a6 ->
WeakClosure a1 <$> g a2 <*> g a3 <*> g a4 <*> g a5 <*> traverse g a6
IntClosure p i -> pure (IntClosure p i)
......
......@@ -58,7 +58,9 @@ newtype ClosurePtr = ClosurePtr Word64
instance Show ClosurePtr where
show (ClosurePtr p) = "0x" ++ showHex (fromBE64 p) ""
data StackCont = StackCont RawStack deriving Show
data StackCont = StackCont { stackContStack :: !RawStack
, stackContSp :: !Word64
} deriving Show
newtype StackPtr = StackPtr Word64
......
......@@ -509,7 +509,7 @@ void serve(void) {
local.sun_family = AF_UNIX;
const char* sock = getenv("GHC_DEBUG_SOCKET");
if (sock == NULL){ sock = "/tmp/ghc-debug"; }
strcpy(local.sun_path, sock);
strncpy(local.sun_path, sock, sizeof(local.sun_path));
unlink(local.sun_path);
if (bind(s, (struct sockaddr *) &local, sizeof(local)) != 0) {
barf("bind failed");
......