Debugger Live Chat Transcript from Jan. 12th, 2000

By: Christine Ellis

Abstract: Debugger Live Chat Transcript from Jan. 12th, 2000

Delphi/C++Builder Live Chat on Wednesday, January 12, 2000

Subject: Debugger

Chat Formatting Conventions

chatter 1

This is a question asked by a chat participant

speaker 1

This is an answer or message posted by a speaker

chatter 2

This is another question asked by a chat participant

speaker 2

This is another answer or message posted by a speaker

editor

This is an editorial comment

Chat Transcript from Wednesday, January 12, 2000

Please note: Some of the text for this chat has been edited for clarity.

Chat User

Message

cellis

Welcome to today's moderated chat on the Debugger!
Your moderator(s) for today's event are:
Charlie Calvert - Developer Relations.
John "JT" Thomas - Developer Relations
The speaker(s) present at today's chat are:
Chris Hesik - IDE/Debugger R&D Engineer
Danny Thorpe - Senior Delphi R&D Engineer
Maurice Barnum - Debugger R&D Engineer
Allen Bauer - R&D Manager
Chuck Jazdzewski - Delphi Chief Architect

cellis

Forward-looking statements in this chat, including but not limited to, those concerning Inprise's future financial performance, product availability dates, results of the Company's strategic review, and the potential features of or benefits to be derived from the Company's products, involve a number of uncertainties and risks, and actual events or results may differ materially. Factors that could cause actual events or results to differ materially include, among others, the following: possible disruptive effects of organizational or personnel changes by the Company, shifts in customer demand, market acceptance of the Company's new or enhanced products, delays in scheduled product availability dates, actions or announcements by competitors, software errors, general business conditions and market growth rates in the client/server and Internet software markets, and other factors described in the Company's S.E.C. reports on Forms 10-K and 10-Q.

cellis

This auditorium is currently quiet. General chat has been disabled to keep the noise down. You will not be able to see other users also logged into this auditorium. To ask a question, use /ask and type in your question. Please indicate to which product, Delphi or C++Builder, your question is in reference.

srikarthi

Will Kylix carry the same Turbo Debugger kind of UI and adhere to the same standards?

abauer

Yes. That is the current plan.

lvermeulen

[Delphi) Any chance of opening up the disassembler interface for reuse in other apps?

mbarnum

We're not planning on it currently, but its something that we'll look into.

whoopdeedoo

Are there differences between the debugger capabilities in the standard, pro, and enterprise versions?

chesik

Yes. The basic debugging capabilities are in all SKUs. The PRO sku adds some advanced features like event logging and attaching to processes. The Enterprise SKU provides remote and distributed debugging features. Check out the feature matrices on our Web site for more info.

mylesp

Would it be possible to add to the watch expression window an option to interpret a Date/TTime/TDateTime and display a real date (eg., instead of having to type all the time FormatDateTime('dd-mmm-yyyy HH:MM:SS'))?

abauer

That is a good suggestion. We'll consider it for a future release.

Aymon

(Delphi) Is the format of the debugger information (in exe files) publicy available? If not, what are the conditions to have access to this information?

mbarnum

For the "td32" debug format, we're preparing an article on how to use a debug info dll that's been written. It'll show up in CodeCentral shortly. The native debug info format in delphi is not available --- its the internal compiler state.

mbarnum

Clarification on the answer to the question above: Delphi can generate TD32 debug info. Look in the compiler options page, -v from the command line.

Dave_L

[BCB 4 (update 1)] I'm interested in tips/techniques for debugging Windows API/VCL related problems.

dthorpe

That's too broad a topic for this question/answer chat. Please be more specific.

Marco

[Delphi] What is the purpose of Debug DCUs? Is it to allow step-by-step debugging on the VCL's source? How is it done?

chesik

The debug DCUs are provided so you can link to VCL DCUs which are prebuilt with debug info. The debug DCUs also contain stack frames for easier debugging. When you enable the option, it uses the Debug DCU path on the debugger option page as the path to find your debug DCUs (This path will appear at the beginning of your unit search path).

mylesp

Is there any plan to develop a post mortem debugger (eg., It would be nice to be able to save the process workspace)?

mbarnum

There's no current plan for this feature yet, but I've been researching the issue. Stay tuned.

srikarthi

Will there be any differences in the FPU and CPU debugging in Kylix in comparison to the current version in C++Builder/Delphi?

abauer

We don't plan on it. However, if you are asking about the mnemonic format used, that has not been determined.

roelof_e

Is there any reason why you can only copy a single line in the D5 CPU window? Multi-line copy would be much more useful, I think.

chesik

Yeah, I know this is annoying. I'm hoping to provide better clipboard support in the CPU view (a la TD32) in a future release.

bugger

Would you consider "custom views" on a data structure useful? Much like the current inspector, only customizable.

mbarnum

Yes, this would be a useful feature and we're looking into it.

Adoniram

Is there any real need to use an external debugger after the improvements made in the integrated debugger in the last release?

chesik

Hopefully, no. Of course, if you have features that are lacking that are available in TD32, I would be very interested in adding them.

MrTrue

Currently the IS and AS operators are not supported in the Evaluate window. Will this change in the near future?

abauer

"Is" may be able to to be supported. However, "as" will probably not since it could raise an exception.

whoopdeedoo

Is it better to debug a Web app on the same machine or use remote debugging to debug it on a separate machine?

mbarnum

Debugging locally whenver possible is preferable, mostly for performance reasons.

bugger

Is there a way to have *only* the debugger on a local system and all project data on a (far away) remote system?

chesik

Yes, using Run|Parameters|Remote and clicking the Load button, you can load a remote process without building in the current IDE session. Of course, you'll need your RSM files (Delphi) and TDS files (BCB) on the remote machine. Also, you'll need access to the source on the remote machine.

lvermeulen

(Delphi) There's the old OMF debug info format, and there's the ELF debug info format on Linux (I guess). Any chance of unifying the two with a common library interface?

dthorpe

In the Kylix compiler(s), the "-v" compile switch will generate GDB-compatible debug info in the executable file. IDE debugging will continue to use compiler symbols directly with no debug info data in the executable file.

Marco

Can I put a breakpoint inside a VCL using Debug DCUs?

chesik

Yes. I forgot to mention earlier, you need to turn off Build with runtime packages in order for Debug DCUs to work.

mylesp

Are there any plans to get the ToolTip/evaluate modify to work directly on expressions inside WITH statements? Its a bit of a pain having to keep keying the WITH expression evaluator all the time.

abauer

Err... This has often been requested. However, it is extremely difficult to get correct, and not display incorrect, values which is worse than displaying nothing.

MrTrue

Is there any way to dock the Evaluate window (make it behave more like the other Delphi windows)?

chesik

No, since it's a dialog (albeit non-modal) and not a view.

bugger

Remote debug clarification: I do not have the source code locally present. Everything is on the remote machine.

chesik

This will work, as long as you have a drive mapped to the remote machine (or you can use UNC names).

srikarthi

What is the maturity state of the current version of the debugger thats going to be demostrated in Seatle, WA this month?

dthorpe

Well, the current version of the product is Delphi 5 / BCB 4. The maturity level of the debugger is very, very good. ;> I don't know what John Kaster is planning to demo in Seattle, but I can guarantee it does not include a GUI debugger on Linux. Have patience.

eo-1

In C++Builder, is there a way to programmatically obtain a stack dump?

mbarnum

Not easily (the hardest part will be reading the debug info). In the next release, if you use CodeGuard, you could create a function that creates a spurious "error", and you'll get the dump in the CodeGuard log.

MrTrue

Is there any way to create an "Immediate" window (multi-line/free-form Evaluator)? Maybe using the ToolsAPI?

abauer

Sure. There should be enough support in the ToolsAPI to do this.

mylesp

Would it be possible to add the class name/type of objects, etc. to the tool tip expression, as when using polyporhism? Its not always obvious.

chesik

Yeah, we can look at it. However, the debug inspector provides all this info and more.

hpebley3

We are developing some applications using multiple, dynamically loaded packages. Many times we can debug one package but not another, and then suddenly it starts working, without even recompiling. It seems to be random. What is the best way to configure the debugger (search paths, compiler options, etc.) so we can consistently debug multiple, dynamically loaded packages? This may be a bit long for a chat but maybe a TI could be written that explains how the debugger finds all the information required to step through source code.

mbarnum

The most important aspect is to ensure that the debugger can find _all_ dcp files for the packages you're using. In Tools | Debugger, there's a symbol search path that you can augment with any paths you need.

srikarthi

Where can I find a full-detailed writeup on remote debugging feature usage (apart from the community site)?

dthorpe

If you find such a writeup, let me know. ;>

mylesp

Is there any reason the find Error (or Compile to line number) was disabled since V3 until you first get an exception thrown? Wuite often on another machine an exception could be thrown, it was then handy to be able to then do a "find error".

chesik

The debugger/evaluator interface changed dramatically from Delphi3 to Delphi4 to support many of the advanced debugging features. The new interface made it so that find error only works when debugging.

gaeckler

When a program crashes and TD32 appears, I cannot see the call-stack. After selecting RUN in the debugger's menu, TD hangs.

mbarnum

You're referring to just-in-time debugging? TD32's JIT debugging doesn't work on Win95/Win98.

Chrismo

Coming from a VB background, I'm a bit of a novice when it comes to understanding the information presented by the CPU window. Danny's Advanced Debugging session I saw @ BC3D was great, but mostly over my head, and I've a lousy memory. Can I get that information he presented anywhere?

dthorpe

Coming from a compiler background, I sometimes have trouble understanding VB. ;> I'd like to publish articles on the community site based on the BorCon material, but Kylix sort of takes priority.

Tor

I am sometimes getting an EInvalidOp (invalid floating point operation) while stepping through source code, while it never happens when running the app outside of the IDE. Does anyone know why this could happen?

chesik

Not sure. Some things which could cause this are:
1) stepping over something which loads a Dll which changes the floating point control word, or
2) setting address breakpoints in the middle of an instruction, or
3) too many or too complex watch expressions.
If you have a test case, please submit a bug report so we can investigate.

gaeckler

Regarding my previous question: I'm using Windows NT 4.0 SP 2 on a Dualprocessor machine.

mbarnum

In that case, I have no idea. Sorry. Unless you have your just-in-time key set incorrectly. SP2 was pretty bad, and TD32 is no longer under development or being tested.

mylesp

Any chance in the CPU register view getting the registers tagged with their current contents (eg., @MyObject, Self)?

dthorpe

There's concern about performance (redrawing all registers and having to do a reverse value lookup many times), but it's a good idea. Perhaps the performance hit could be minimized via tooltips or something... Something to think about, thanks!

srikarthi

Has the Pentium Safe FDIV setting got any reference to the "Priviledged Instruction Set" Error that I used to get sometimes in the same program? (Note: It does work most of the time, but sometimes it bugs me.)

dthorpe

"Priviledged Instruction" usually means that you're off executing data. I'm not aware of a problem with the save FDIV code, but then again, it doesn't get used much anymore since the OS will fix FDIV for you.

bugger

Is debugger stability a function of the OS? In particular, is W2K (RC/RTM) better than NT4 SP5?

mbarnum

Yes. There are OS-specific workarounds in the debuger kernel for both NT and Win9x. Win9x, in particular, is problematic, and crashing the OS while debugging is far too easy. I don't have much experience with W2K yet, but I don't expect it to be much different from NT.

Marco

Are you planning a chat about TTables and TQueries?

jkaster

Sure. These chats are for the benefit of our entire development community. A database chat seems very appropriate considering our product focus. I'll make a note about your request now, but I recommend adding your thoughts/suggestions to the "Comment Thread" of the Chat schedule article (http://community.borland.com/article/1,1410,10208,00.html.) If you prefer EITHER Delphi or C++ Builder, indicate it in your comment. Thanks!

mylesp

How about adding to the CPU view, a manual (or even INTEL doc/Web page reference) on the assember instructions. I never learned the I386/I486 instruction set coming from a 6502/68000 background (i.e., I no longer write assember code full time.)

chesik

This is probably beyond the scope of what our doc department wants to do. There are many good Intel/third party books on the Intel instruction set, as well as full documentation available on the Intel Web site.

jp2000

We have a Delphi 5 main app (.exe) that calls into several C++ DLLs. We are using MS C++. We want to be able use the Delphi IDE to debug and debug into our C++ in Visual Studio. We have Asserts in our C++ code (to bring up the visual studio debugger- it is our specified debugger in the registry). However, it seems that Delphi traps the interupt and we can't get to our Visual Studio to debug. I believe this should be possible. If so, what are we missing?

abauer

There is no way to allow two debuggers to debug the same process. You should debug the C++ DLL in VS by using the Delphi app as the host. Another thing to try is to use C++Builder for the DLL and then you can use either IDE to debug the application since they both know about each other's debug format. The Delphi IDE just needs access to the C++ compiler DLL that ships with C++Builder. We do not support reading of VS debug symbols.

JohnT

Exactly what does "attach to and debug running processes" mean? (Just joined here, forgive me if this was asked).

mbarnum

It allows you to connect the debugger to a running process on your machine. Be careful when doing this. There's no way to detach without killing the process under Windows.

Marco

I'm developping with a shell and many packages. One of the packages holds many forms and 1 component. In Delphi 4, it was working fine. In D5, it was crashing every time I compiled the package. I removed the component and the problem was solved. Can you imagine what happened?

abauer

You should try and narrow it down to a smaller test case and submit a bug report. This could be a latent bug that is in your code that when you upgraded to D5, the code moved around enough to expose the problem. Of course , it still could be a bug in D5.

gaeckler

Is there an easy way to switch between both debuggers? I have both installed, C++Builder 4 Enterprise and Delphi 5 Prof.

mbarnum

I don't understand the question. If you mean switching between the two just-in-time debuggers, there isn't a nice way to do this (the OS only provides one registry key). This is an issue we will be addressing in the next release of each respective product.

Marco

Is D5 more of a memory consumer than D4? With 128Mb of RAM in Windows 98, I can't run more than 3 applications other than D5 to get low on resources.

dthorpe

Yes, D5 does take a little more memory than D4, but then again, Win98 uses more memory than Win95. Win98 also does not handle 128MB efficiently (not as well as NT). I really, really, really recommend NT for development and debugging. You need an OS that can reliably reset processes without crashing!

mylesp

Actually being able to tag what is in the stack view would be good also (tools tips would be fine, or an option to enable/disable would be okay.) I don't have problems with performace (just get a faster machine) -- with 700mhz machine's who cares ..(o

mbarnum

Thanks for the suggestion. We'll look into making this easier to use. Danny asks, "What's ..(o ?"

MrTrue

Are there any TIs on debugging ISAPI DLLs on Win2000/IIS?

chesik

It should be similar to debugging under IIS on NT, which there should be info on. After Win2k is in widespread release, I'm sure the steps will get updated to work there as well.

mylesp

Is there going to be any closer intergration with 3rd party debuggers (eg., NuMega bounds checker)?

jthomas

We would like that. We value all of our partners and NuMega's support for our products. As it stands now, the latest BoundChecker is integrated into our IDE, but we would like to see more support from them (VCL validation, etc.). Please refer 3rd parties to me jt@borland.com or any Developer Relations Manager if you would like to see more support from them in our products.

mylesp

Are exception objects on the stack or the heap?

dthorpe

Delphi exception objects are always allocated from the heap. The exception frame is on the stack, not the object it points to.

bugger

How do I debug JNI code (i.e., my DLL that is loaded into the Java VM)?

mbarnum

Set java.exe or javaw.exe (or whatever) as the host application.

srikarthi

Will the Kylix debugger be a multi-platform independent program or integrated into the IDE?

abauer

It will be integrated into the IDE.

doichin

What about the evaluation of register variables in Delphi?

chesik

This works as long as the variable is still alive (not optimized by the compiler). If you've got cases where this is too restrictive for you, just turn off all compiler optimizations.

abauer

Thanks for attending.

dthorpe

Bye!

chesik

Good chat, everyone. Thanks for participating.

mbarnum

Bye.

cellis

Thank you for joining us today!
The auditorium will be unhushed shortly so that you can resume general chat.
Please join us for future Inprise/Borland Team chats. The schedule of upcoming live chats can be found at http://community.borland.com/article/1,1410,10208,00.html.
Hope to see you here again!

jthomas

Thanks for your questions. It was fun. See you next time.


Server Response from: ETNASC03