Re: SPAM-LOW: Re: SPAM-LOW: buffer problem

well,

if u all insist, here is the dump from WinDbg.

index is : 955
buffer[955] is :

(READ)
index is : 963
buffer9[63] is :

and so on, the routine in in IRP_MJ_READ

On 8/10/05, xxxxx@garlic.com wrote:
> It is always easy for us to shoot it down, if infos are properly given as
> Arlie has been suggesting.
>
> One other thing I would guess is that since you are using KdPrint, hope
> you are using debug build. In otherwords DBG is defined. I’m only guessing
> here and just to be sure that KdPrint is not getting translated to NOP due
> to the macro definition.
>
> -pro
>
> > Provide more specific information. We can’t read your mind or your
> > screen.
> > Attach a dump of the WinDbg/KD output and the commands you executed. It’s
> > the fastest way to figure out the problem, at least if you want help from
> > the list.
> >
> > – arlie
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Albert Pinto
> > Sent: Tuesday, August 09, 2005 1:13 PM
> > To: Windows System Software Devs Interest List
> > Subject: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem
> >
> > prokash,
> >
> >>It is just other way to look at to figure out if you happen to have
> >>index problem when you are trying to print from the code.
> >
> > I tried that, everything is fine, else it wouldn’t have gone into the
> > if…else i am using the same offset at both places and the condition
> > checker is hard coded!!!
> > no mistakes there
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@garlic.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Perhaps you’ve already answered this but what’s the difference between
“buffer” and “buff”?

Does buff[OFFSET] perhaps contain an unprintable character?

-p

if(buffer[OFFSET]==‘2’){
KdPrint((“\n 2 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}
else if(buffer[OFFSET]==‘1’){
KdPrint((“\n 1 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Albert Pinto
Sent: Tuesday, August 09, 2005 10:48 PM
To: Windows System Software Devs Interest List
Subject: Re: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

well,

if u all insist, here is the dump from WinDbg.

index is : 955
buffer[955] is :

(READ)
index is : 963
buffer9[63] is :

and so on, the routine in in IRP_MJ_READ

On 8/10/05, xxxxx@garlic.com wrote:
> It is always easy for us to shoot it down, if infos are properly given

> as Arlie has been suggesting.
>
> One other thing I would guess is that since you are using KdPrint,
> hope you are using debug build. In otherwords DBG is defined. I’m only

> guessing here and just to be sure that KdPrint is not getting
> translated to NOP due to the macro definition.
>
> -pro
>
> > Provide more specific information. We can’t read your mind or your
> > screen.
> > Attach a dump of the WinDbg/KD output and the commands you executed.

> > It’s the fastest way to figure out the problem, at least if you want

> > help from the list.
> >
> > – arlie
> >
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Albert Pinto
> > Sent: Tuesday, August 09, 2005 1:13 PM
> > To: Windows System Software Devs Interest List
> > Subject: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem
> >
> > prokash,
> >
> >>It is just other way to look at to figure out if you happen to have
> >>index problem when you are trying to print from the code.
> >
> > I tried that, everything is fine, else it wouldn’t have gone into
> > the if…else i am using the same offset at both places and the
> > condition checker is hard coded!!!
> > no mistakes there
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@garlic.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I asked him that 24 hours ago. Got no response (that I could see).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: 10 August 2005 17:02
To: Windows System Software Devs Interest List
Subject: RE: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

Perhaps you’ve already answered this but what’s the
difference between “buffer” and “buff”?

Does buff[OFFSET] perhaps contain an unprintable character?

-p

if(buffer[OFFSET]==‘2’){
KdPrint((“\n 2 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}
else if(buffer[OFFSET]==‘1’){
KdPrint((“\n 1 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Albert Pinto
Sent: Tuesday, August 09, 2005 10:48 PM
To: Windows System Software Devs Interest List
Subject: Re: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

well,

if u all insist, here is the dump from WinDbg.

index is : 955
buffer[955] is :

(READ)
index is : 963
buffer9[63] is :

and so on, the routine in in IRP_MJ_READ

On 8/10/05, xxxxx@garlic.com wrote:
> > It is always easy for us to shoot it down, if infos are
> properly given
>
> > as Arlie has been suggesting.
> >
> > One other thing I would guess is that since you are using KdPrint,
> > hope you are using debug build. In otherwords DBG is
> defined. I’m only
>
> > guessing here and just to be sure that KdPrint is not getting
> > translated to NOP due to the macro definition.
> >
> > -pro
> >
> > > Provide more specific information. We can’t read your
> mind or your
> > > screen.
> > > Attach a dump of the WinDbg/KD output and the commands
> you executed.
>
> > > It’s the fastest way to figure out the problem, at least
> if you want
>
> > > help from the list.
> > >
> > > – arlie
> > >
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of
> Albert Pinto
> > > Sent: Tuesday, August 09, 2005 1:13 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem
> > >
> > > prokash,
> > >
> > >>It is just other way to look at to figure out if you
> happen to have
> > >>index problem when you are trying to print from the code.
> > >
> > > I tried that, everything is fine, else it wouldn’t have gone into
> > > the if…else i am using the same offset at both places and the
> > > condition checker is hard coded!!!
> > > no mistakes there
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@garlic.com To
> > > unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

I asked him the same thing and he said it was a typo since he typed the
code on this email, didn’t actually copy it from him code.

Ravi

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Ward
Sent: Wednesday, August 10, 2005 8:55 AM
To: Windows System Software Devs Interest List
Subject: RE: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

I asked him that 24 hours ago. Got no response (that I could see).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: 10 August 2005 17:02
To: Windows System Software Devs Interest List
Subject: RE: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

Perhaps you’ve already answered this but what’s the
difference between “buffer” and “buff”?

Does buff[OFFSET] perhaps contain an unprintable character?

-p

if(buffer[OFFSET]==‘2’){
KdPrint((“\n 2 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}
else if(buffer[OFFSET]==‘1’){
KdPrint((“\n 1 buffer[%u] is : %c”,OFFSET,buff[OFFSET]));
}

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Albert Pinto
Sent: Tuesday, August 09, 2005 10:48 PM
To: Windows System Software Devs Interest List
Subject: Re: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem

well,

if u all insist, here is the dump from WinDbg.

index is : 955
buffer[955] is :

(READ)
index is : 963
buffer9[63] is :

and so on, the routine in in IRP_MJ_READ

On 8/10/05, xxxxx@garlic.com wrote:
> > It is always easy for us to shoot it down, if infos are
> properly given
>
> > as Arlie has been suggesting.
> >
> > One other thing I would guess is that since you are using KdPrint,
> > hope you are using debug build. In otherwords DBG is
> defined. I’m only
>
> > guessing here and just to be sure that KdPrint is not getting
> > translated to NOP due to the macro definition.
> >
> > -pro
> >
> > > Provide more specific information. We can’t read your
> mind or your
> > > screen.
> > > Attach a dump of the WinDbg/KD output and the commands
> you executed.
>
> > > It’s the fastest way to figure out the problem, at least
> if you want
>
> > > help from the list.
> > >
> > > – arlie
> > >
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of
> Albert Pinto
> > > Sent: Tuesday, August 09, 2005 1:13 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: SPAM-LOW: Re: SPAM-LOW: [ntdev] buffer problem
> > >
> > > prokash,
> > >
> > >>It is just other way to look at to figure out if you
> happen to have
> > >>index problem when you are trying to print from the code.
> > >
> > > I tried that, everything is fine, else it wouldn’t have gone into
> > > the if…else i am using the same offset at both places and the
> > > condition checker is hard coded!!!
> > > no mistakes there
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> > > To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@garlic.com To
> > > unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument:
> ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
> argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Albert Pinto wrote:

well,

if u all insist, here is the dump from WinDbg.

index is : 955
buffer[955] is :

(READ)
index is : 963
buffer9[63] is :

and so on, the routine in in IRP_MJ_READ

But, Albert, this output is NOT the same as the print statements in the
code you posted. That snippet never mentioned “index”.

Can you not understand our frustration? We would like to be able to
offer useful advice, but you keep dribbling out bits and pieces of
information, one bit at a time, and the additional pieces don’t match
the original pieces.

PLEASE, cut-and-paste the code you are using, and cut-and-paste the
output from windbg (it does support the clipboard), and send them along.

You also might try changing your printf to display the integer value as
well:
KdPrint((…“buffer[%d] is %c (%d)\n”, index, buffer[index],
buffer[index]));


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

members,

of hand I have created a lot of confusion amongst you just because of
a stupid typo error, and trying to reproduce the code by typing it.
well here is the original with the WinDbg output…

In global header the variable is declared as

#define SIZEB 3000000
PCHAR buffer;

in driver entry i allocate and initialize the buffer as

buffer=ExAllocatePool( NonPagedPoolCacheAligned ,SIZEB);
RtlFillBytes(buffer,SIZEB,‘1’);

In another function f00() that is called in some dispatcher, I write

if(buffer[OFFSET]==‘2’){
KdPrint((“\nindex is : %u”,OFFSET));
KdPrint((“\n buffer[%u] is : %c”,OFFSET,buffer[OFFSET]));
return 1;
}
else if(buffer[OFFSET]==‘1’){
KdPrint((\nindex is : %u",OFFSET));
KdPrint((“\n buffer[%u] is : %c”,OFFSET,buffer[OFFSET]));
return 0;
}
}

In the dispatcher for READ, I have…

KdPrint((“\n(READ)”));
foo(OFFSET);

here is the dump from WinDbg.

(READ)
index is : 955
buffer[955] is :

(READ)
index is : 963
buffer[963] is :

I am using debug (checked ) build and I am using WinDbg over a serial
cable conected at 19200 baud rate.

I cannot get the reason why in the debugger I never see the contents
of the location OFFSET!!!

-A

On 8/11/05, Tim Roberts wrote:
> Albert Pinto wrote:
>
> >well,
> >
> >if u all insist, here is the dump from WinDbg.
> >
> >index is : 955
> >buffer[955] is :
> >
> >(READ)
> >index is : 963
> >buffer9[63] is :
> >
> >and so on, the routine in in IRP_MJ_READ
> >
> >
>
> But, Albert, this output is NOT the same as the print statements in the
> code you posted. That snippet never mentioned “index”.
>
> Can you not understand our frustration? We would like to be able to
> offer useful advice, but you keep dribbling out bits and pieces of
> information, one bit at a time, and the additional pieces don’t match
> the original pieces.
>
> PLEASE, cut-and-paste the code you are using, and cut-and-paste the
> output from windbg (it does support the clipboard), and send them along.
>
> You also might try changing your printf to display the integer value as
> well:
> KdPrint((…“buffer[%d] is %c (%d)\n”, index, buffer[index],
> buffer[index]));
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>



- Developer