Revert r39846 and r39847.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39849 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-12-14 17:55:38 +00:00
parent 68258fd9d0
commit 27a115f668
11 changed files with 1 additions and 192 deletions

View File

@ -180,8 +180,6 @@ typedef enum {
B_DEBUGGER_MESSAGE_TEAM_DELETED, // the debugged team is gone
B_DEBUGGER_MESSAGE_TEAM_EXEC, // the debugged team executes exec()
B_DEBUGGER_MESSAGE_THREAD_CREATED, // a thread has been created
B_DEBUGGER_MESSAGE_THREAD_RENAMED, // a thread has been renamed
B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED, // a thread has had its priority altered
B_DEBUGGER_MESSAGE_THREAD_DELETED, // a thread has been deleted
B_DEBUGGER_MESSAGE_IMAGE_CREATED, // an image has been created
B_DEBUGGER_MESSAGE_IMAGE_DELETED, // an image has been deleted
@ -547,25 +545,9 @@ typedef struct {
typedef struct {
debug_origin origin; // the thread that created the new thread
thread_id new_thread; // the newly created thread
team_id new_thread; // the newly created thread
} debug_thread_created;
// B_DEBUGGER_MESSAGE_THREAD_RENAMED
typedef struct {
debug_origin origin;
thread_id renamed_thread; // the thread whose name has changed
char name[B_OS_NAME_LENGTH];
} debug_thread_renamed;
// B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED
typedef struct {
debug_origin origin;
thread_id changed_thread; // the thread whose priority has changed
int32 new_priority; // the new priority
} debug_thread_priority_changed;
// B_DEBUGGER_MESSAGE_THREAD_DELETED
typedef struct {
@ -637,8 +619,6 @@ typedef union {
debug_team_deleted team_deleted;
debug_team_exec team_exec;
debug_thread_created thread_created;
debug_thread_renamed thread_renamed;
debug_thread_priority_changed thread_priority_changed;
debug_thread_deleted thread_deleted;
debug_image_created image_created;
debug_image_deleted image_deleted;

View File

@ -42,11 +42,6 @@ public:
const debug_team_exec& message);
virtual bool HandleThreadCreated(
const debug_thread_created& message);
virtual bool HandleThreadRenamed(
const debug_thread_renamed& message);
virtual bool HandleThreadPriorityChanged(
const debug_thread_priority_changed&
message);
virtual bool HandleThreadDeleted(
const debug_thread_deleted& message);
virtual bool HandleImageCreated(

View File

@ -234,8 +234,6 @@ void user_debug_team_deleted(team_id teamID, port_id debuggerPort);
void user_debug_team_exec();
void user_debug_update_new_thread_flags(thread_id threadID);
void user_debug_thread_created(thread_id threadID);
void user_debug_thread_renamed(thread_id threadID, const char* name);
void user_debug_thread_priority_changed(thread_id threadID, int32 priority);
void user_debug_thread_deleted(team_id teamID, thread_id threadID);
void user_debug_thread_exiting(struct thread* thread);
void user_debug_image_created(const image_info *imageInfo);

View File

@ -884,25 +884,6 @@ TeamDebugger::_HandleDebuggerMessage(DebugEvent* event)
handled = _HandleThreadCreated(threadEvent);
break;
}
case B_DEBUGGER_MESSAGE_THREAD_RENAMED:
{
ThreadRenamedEvent* threadEvent
= dynamic_cast<ThreadRenamedEvent*>(event);
TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_RENAMED: thread: %ld "
"(\"%s\")\n",
threadEvent->RenamedThread(), threadEvent->NewName());
handled = _HandleThreadRenamed(threadEvent);
break;
}
case B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED:
{
ThreadPriorityChangedEvent* threadEvent
= dynamic_cast<ThreadPriorityChangedEvent*>(event);
TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED: thread:"
" %ld\n", threadEvent->ChangedThread());
handled = _HandleThreadPriorityChanged(threadEvent);
break;
}
case B_DEBUGGER_MESSAGE_THREAD_DELETED:
TRACE_EVENTS("B_DEBUGGER_MESSAGE_THREAD_DELETED: thread: %ld\n",
event->Thread());
@ -972,29 +953,6 @@ TeamDebugger::_HandleThreadCreated(ThreadCreatedEvent* event)
}
bool
TeamDebugger::_HandleThreadRenamed(ThreadRenamedEvent* event)
{
AutoLocker< ::Team> locker(fTeam);
::Thread* thread = fTeam->ThreadByID(event->RenamedThread());
if (thread != NULL)
thread->SetName(event->NewName());
return false;
}
bool
TeamDebugger::_HandleThreadPriorityChanged(ThreadPriorityChangedEvent*)
{
// TODO: implement once we actually track thread priorities
return false;
}
bool
TeamDebugger::_HandleThreadDeleted(ThreadDeletedEvent* event)
{

View File

@ -95,10 +95,6 @@ private:
bool _HandleThreadCreated(
ThreadCreatedEvent* event);
bool _HandleThreadRenamed(
ThreadRenamedEvent* event);
bool _HandleThreadPriorityChanged(
ThreadPriorityChangedEvent* event);
bool _HandleThreadDeleted(
ThreadDeletedEvent* event);
bool _HandleImageCreated(

View File

@ -155,32 +155,6 @@ ThreadCreatedEvent::ThreadCreatedEvent(team_id team, thread_id thread,
}
// #pragma mark - ThreadRenamedEvent
ThreadRenamedEvent::ThreadRenamedEvent(team_id team, thread_id thread,
thread_id renamedThread, const char* newName)
:
DebugEvent(B_DEBUGGER_MESSAGE_THREAD_RENAMED, team, thread),
fRenamedThread(renamedThread)
{
strlcpy(fName, newName, sizeof(fName));
}
// #pragma mark - ThreadPriorityChangedEvent
ThreadPriorityChangedEvent::ThreadPriorityChangedEvent(team_id team,
thread_id thread, thread_id changedThread, int32 newPriority)
:
DebugEvent(B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED, team, thread),
fChangedThread(changedThread),
fNewPriority(newPriority)
{
}
// #pragma mark - ThreadDeletedEvent

View File

@ -127,36 +127,6 @@ private:
};
class ThreadRenamedEvent : public DebugEvent {
public:
ThreadRenamedEvent(team_id team,
thread_id thread, thread_id renamedThread,
const char* name);
thread_id RenamedThread() const { return fRenamedThread; }
const char* NewName() const { return fName; }
private:
thread_id fRenamedThread;
char fName[B_OS_NAME_LENGTH];
};
class ThreadPriorityChangedEvent : public DebugEvent {
public:
ThreadPriorityChangedEvent(team_id team,
thread_id thread, thread_id changedThread,
int32 newPriority);
thread_id ChangedThread() const { return fChangedThread; }
int32 NewPriority() const { return fNewPriority; }
private:
thread_id fChangedThread;
int32 fNewPriority;
};
class ThreadDeletedEvent : public DebugEvent {
public:
ThreadDeletedEvent(team_id team,

View File

@ -670,17 +670,6 @@ DebuggerInterface::_CreateDebugEvent(int32 messageCode,
event = new(std::nothrow) ThreadCreatedEvent(message.origin.team,
message.origin.thread, message.thread_created.new_thread);
break;
case B_DEBUGGER_MESSAGE_THREAD_RENAMED:
event = new(std::nothrow) ThreadRenamedEvent(message.origin.team,
message.origin.thread, message.thread_renamed.renamed_thread,
message.thread_renamed.name);
break;
case B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED:
event = new(std::nothrow) ThreadPriorityChangedEvent(
message.origin.team, message.origin.thread,
message.thread_priority_changed.changed_thread,
message.thread_priority_changed.new_priority);
break;
case B_DEBUGGER_MESSAGE_THREAD_DELETED:
event = new(std::nothrow) ThreadDeletedEvent(message.origin.team,
message.origin.thread);

View File

@ -168,10 +168,6 @@ TeamWindow::DispatchMessage(BMessage* message, BHandler* handler)
&& message->FindInt32("modifiers", (int32*)&modifiers)
== B_OK) {
switch (key) {
case B_F5_KEY:
fListener->ThreadActionRequested(
fActiveThread->ID(), MSG_THREAD_RUN);
break;
case B_F10_KEY:
fListener->ThreadActionRequested(
fActiveThread->ID(), MSG_THREAD_STEP_OVER);

View File

@ -1077,48 +1077,6 @@ user_debug_thread_created(thread_id threadID)
}
void
user_debug_thread_renamed(thread_id threadID, const char *name)
{
// check, if a debugger is installed and is interested in thread events
struct thread *thread = thread_get_current_thread();
int32 teamDebugFlags = atomic_get(&thread->team->debug_info.flags);
if (~teamDebugFlags
& (B_TEAM_DEBUG_DEBUGGER_INSTALLED | B_TEAM_DEBUG_THREADS)) {
return;
}
// prepare the message
debug_thread_renamed message;
message.renamed_thread = threadID;
strlcpy(message.name, name, sizeof(message.name));
thread_hit_debug_event(B_DEBUGGER_MESSAGE_THREAD_RENAMED, &message,
sizeof(message), true);
}
void
user_debug_thread_priority_changed(thread_id threadID, int32 priority)
{
// check, if a debugger is installed and is interested in thread events
struct thread *thread = thread_get_current_thread();
int32 teamDebugFlags = atomic_get(&thread->team->debug_info.flags);
if (~teamDebugFlags
& (B_TEAM_DEBUG_DEBUGGER_INSTALLED | B_TEAM_DEBUG_THREADS)) {
return;
}
// prepare the message
debug_thread_priority_changed message;
message.changed_thread = threadID;
message.new_priority = priority;
thread_hit_debug_event(B_DEBUGGER_MESSAGE_THREAD_PRIORITY_CHANGED, &message,
sizeof(message), true);
}
void
user_debug_thread_deleted(team_id teamID, thread_id threadID)
{

View File

@ -2559,9 +2559,6 @@ rename_thread(thread_id id, const char *name)
RELEASE_THREAD_LOCK();
restore_interrupts(state);
if (status == B_OK)
user_debug_thread_renamed(id, name);
return status;
}
@ -2604,8 +2601,6 @@ set_thread_priority(thread_id id, int32 priority)
scheduler_set_thread_priority(thread, priority);
}
user_debug_thread_priority_changed(id, priority);
return oldPriority;
}