2 * Copyright 2016, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
10 #include <AutoLocker.h>
12 #include "DebuggerInterface.h"
17 WriteCoreFileJob::WriteCoreFileJob(Team
* team
,
18 DebuggerInterface
* interface
, const entry_ref
& path
)
20 fKey(&path
, JOB_TYPE_WRITE_CORE_FILE
),
22 fDebuggerInterface(interface
),
25 fDebuggerInterface
->AcquireReference();
29 WriteCoreFileJob::~WriteCoreFileJob()
31 fDebuggerInterface
->AcquireReference();
36 WriteCoreFileJob::Key() const
43 WriteCoreFileJob::Do()
45 BPath
path(&fTargetPath
);
46 status_t error
= path
.InitCheck();
50 error
= fDebuggerInterface
->WriteCoreFile(path
.Path());
54 AutoLocker
< ::Team
> teamLocker(fTeam
);
55 fTeam
->NotifyCoreFileChanged(path
.Path());