[haiku-commits] Re: haiku: hrev46518 - src/system/kernel/debug src/system/kernel/vm headers/private/kernel src/system/boot/loader src/system/kernel/arch/x86

  • From: kallisti5@xxxxxxxxxxx
  • To: Urias McCullough <umccullough@xxxxxxxxx>
  • Date: Tue, 10 Dec 2013 16:08:24 -0600

On Dec 10, 2013 1:08 PM, Urias McCullough <umccullough@xxxxxxxxx> wrote:
>
> On Tue, Dec 10, 2013 at 10:14 AM,  <ingo_weinhold@xxxxxx> wrote: 
> > Revision:    hrev46518 
> > Commit:      c259766f94e7cfbe9318eda438d89f62a5099949 
> > URL:         http://cgit.haiku-os.org/haiku/commit/?id=c259766 
> > Author:      Ingo Weinhold <ingo_weinhold@xxxxxx> 
> > Date:        Tue Dec 10 18:13:56 2013 UTC 
> > 
> > KDL "mapping" command: Allow specifying a thread ID 
> > 
> > ... instead of only a team ID. 
> > 
> > ----------------------------------------------------------------------------
> >  
> > 
> > diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp 
> > index f342e19..d4a01cc 100644 
> > --- a/src/system/kernel/vm/vm.cpp 
> > +++ b/src/system/kernel/vm/vm.cpp 
> > @@ -3430,7 +3430,7 @@ dump_mapping_info(int argc, char** argv) 
>
> ... 
>
> > +               uint64 threadID = -1; 
>
> ... 
>
> Should be an int64 instead? 
>
> C++ 
> /usr/home/builder/buildbot-slave/x86-FreeBSD-host/generated.x86_gcc2/objects/haiku/x86_gcc2/release/system/kernel/vm/vm.o
>  
> cc1plus: warnings being treated as errors 
> /usr/home/builder/buildbot-slave/haiku/src/system/kernel/vm/vm.cpp: In 
> function `int dump_mapping_info(int, char **)': 
> /usr/home/builder/buildbot-slave/haiku/src/system/kernel/vm/vm.cpp:3446: 
> warning: initialization of negative value `-1' to `uint64' 
>

I was going to fix it.. But it seems flawed in a few ways.  It technically 
should be thread_id. (Int32) but evaluate_debug_expression wants a uint64.

GetDebug wants a thread_id.  I could just cast it... But as we set the thread 
id to -1 I don't know the code well enough to assume it would work...

Leaving it for Ingo 😁

--Alex

Other related posts: