469,270 Members | 1,011 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

.PDB contains less information in RELEASE than in DEBUG?!

it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on so
that it creates .PDB files and I can see the line numbers in stack trace.

To my surprise, release version of .pdb pointed me only to the beginning of
the method saying that Index was out of range. But there was nothing like
that there. After finding an error by other means, I tried to compile the
project in debug mode and regenerate the error. This time I saw the correct
line number. If the release version pointed me to here, I could see what's
the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david
Nov 16 '05 #1
5 6381
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on
so
that it creates .PDB files and I can see the line numbers in stack trace.

To my surprise, release version of .pdb pointed me only to the beginning
of
the method saying that Index was out of range. But there was nothing like
that there. After finding an error by other means, I tried to compile the
project in debug mode and regenerate the error. This time I saw the
correct
line number. If the release version pointed me to here, I could see what's
the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david

Nov 16 '05 #2
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
it's me again..
with quite interesting discovery :)

I was tracing an error for 3 hours instead of 3 minutes because of this
surprise.

Recently I'm compiling this project in RELEASE with Debug info turned on
so
that it creates .PDB files and I can see the line numbers in stack trace.
To my surprise, release version of .pdb pointed me only to the beginning
of
the method saying that Index was out of range. But there was nothing like that there. After finding an error by other means, I tried to compile the project in debug mode and regenerate the error. This time I saw the
correct
line number. If the release version pointed me to here, I could see what's the problem immediatelly.

how can I force release PDB to behave like debug PDB?
Release PDB only gives me approxiamate exception location!?

THANK YOU!

david


Nov 16 '05 #3
Perhaps try changing the 'Optimize code' option (in the projects settings)
for the release configuration to false.

"David Krmpotic" <no**@spam.ne> wrote in message
news:8L*******************@news.siol.net...
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has
been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
> it's me again..
> with quite interesting discovery :)
>
> I was tracing an error for 3 hours instead of 3 minutes because of this
> surprise.
>
> Recently I'm compiling this project in RELEASE with Debug info turned
> on
> so
> that it creates .PDB files and I can see the line numbers in stack trace. >
> To my surprise, release version of .pdb pointed me only to the
> beginning
> of
> the method saying that Index was out of range. But there was nothing like > that there. After finding an error by other means, I tried to compile the > project in debug mode and regenerate the error. This time I saw the
> correct
> line number. If the release version pointed me to here, I could see what's > the problem immediatelly.
>
> how can I force release PDB to behave like debug PDB?
> Release PDB only gives me approxiamate exception location!?
>
> THANK YOU!
>
> david
>
>



Nov 16 '05 #4
You got it! indeed, when I change it to false, it shows the exact line
number.
so I guess this is a tradeoff.. or...

... does anybody have some other suggestions for having the code optimized
and still get the right line number?


"Andrew Smith (Infragistics)" <pr************@infragistics.com> wrote in
message news:eg*************@TK2MSFTNGP15.phx.gbl...
Perhaps try changing the 'Optimize code' option (in the projects settings)
for the release configuration to false.

"David Krmpotic" <no**@spam.ne> wrote in message
news:8L*******************@news.siol.net...
I know it's not the same.. but I was hoping that this would still be
possible in release.
only that asserts would be thrown out in debug and some other things.

so that's just how it is ?

ok then.. thank you !

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uW**************@TK2MSFTNGP10.phx.gbl...
Obviously, the Release mode is not the same thing as the Debug mode;
otherwise it would be totally unnecessary.

The release mode cannot give you the exact location because the code has been internally optimized by the compiler and things such as a "line of
code" doesn't really exist anymore.

S. L.

"David Krmpotic" <no**@spam.ne> wrote in message
news:NV*******************@news.siol.net...
> it's me again..
> with quite interesting discovery :)
>
> I was tracing an error for 3 hours instead of 3 minutes because of this > surprise.
>
> Recently I'm compiling this project in RELEASE with Debug info turned
> on
> so
> that it creates .PDB files and I can see the line numbers in stack

trace.
>
> To my surprise, release version of .pdb pointed me only to the
> beginning
> of
> the method saying that Index was out of range. But there was nothing

like
> that there. After finding an error by other means, I tried to compile

the
> project in debug mode and regenerate the error. This time I saw the
> correct
> line number. If the release version pointed me to here, I could see

what's
> the problem immediatelly.
>
> how can I force release PDB to behave like debug PDB?
> Release PDB only gives me approxiamate exception location!?
>
> THANK YOU!
>
> david
>
>



Nov 16 '05 #5
"David Krmpotic" <no**@spam.ne> wrote in message
news:ue*******************@news.siol.net...
You got it! indeed, when I change it to false, it shows the exact line
number.
so I guess this is a tradeoff.. or...

.. does anybody have some other suggestions for having the code optimized
and still get the right line number?

I do not mean to disparage the explanation already
given about this. But I will try to clarify.

With no or very simple optimizations, there is a
one-to-one correspondence between lines of
source code and contiguous clumps of machine
code. Under such circumstances, it is meaningful
to speak of "the right line number".

There are levels of optimization, commonly
obtained by modern compilers, (including the
MS product), where there is no simple relation
between lines of source code and the clumps
of machine code. The whole idea of "stepping
thru lines of code" breaks down, becomes
inapplicable. The "right line number" does not
exist. It might be possible to assign fragments
of source code, consisting of subexpressions,
to an arbitrary (valid) instruction pointer, but
this is not done and would undoubtedly be
quite confusing if anybody actually did it.

The short answer to your question is "no".

--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.
Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Stanley | last post: by
9 posts views Thread by Microsoft News Server | last post: by
7 posts views Thread by Srinivasa Rao | last post: by
9 posts views Thread by dee | last post: by
3 posts views Thread by Steve Franks | last post: by
2 posts views Thread by newscorrespondent | last post: by
6 posts views Thread by Andrew Rowley | last post: by
7 posts views Thread by news.microsoft.com | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.