Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2003.11.03;
Скачать: [xml.tar.bz2];

Вниз

Help: Не вызывается BreakPoint при отладке DLL под XP!   Найти похожие ветки 

 
LaidBack   (2003-10-21 16:15) [0]

Help: Не вызывается BreakPoint при отладке DLL под XP!
Даже не знаю где и копать!


 
LaidBack   (2003-10-22 09:45) [1]

Ну или хотя бы может ли кто-нибудь проверить отладку DLL в D6 под XP?


 
MBo   (2003-10-22 09:58) [2]

Юрий Зотов © (23.06.03 15:24)
> stalker780

Так я и предполагал, но решил все же уточнить. Это известная проблема. Причина в том, что по непонятным причинам под XP отладчику не всегда удается загрузить таблицу символов DLL, а без нее он, конечно, не работает. Сделайте вот что.

1. Сразу после LoadLibrary поставьте любой ShowMesssage, лишь бы притормозить программу.

2. При появления этого ShowMessage переключитесь в Delphi, нажмите Ctrl+Alt+M (или меню View |Debug Windows | Modules), щелкните на своей DLL правой кнопкой и выберите Reload Symbol Table.

3. Вернитесь в свою программу и в ShowMessagе нажмите ОК, чтобы продолжить ее выполнение. Отладчик должен заработать.


 
KSergey   (2003-10-22 10:08) [3]

Нифига себе косячек.. Даже не понятно в чем
Как всегда борландовцы будут говорить, что в MS что-то скрывают и каждый раз делают по разному...


 
LaidBack   (2003-10-22 10:43) [4]

2MBo - Просто огромнейшее спасибо! А то из-за этого бага у меня затормозился очень большой проект! Спасибо!


 
LaidBack   (2003-10-22 10:52) [5]

Действительно все заработало!


 
Юрий Зотов   (2003-10-22 15:28) [6]

Дополнение.

Если DLL линкуется статически, то LoadLibrary нам недоступен. Тогда можно поставить ShowMessage (MessageBox и т.п.) в самой DLL сразу после ее главного BEGIN (причем это сработает и при динамической линковке тоже).


 
LaidBack   (2003-10-22 15:48) [7]

Еще одна обидная вещь: указывать путь к DLL необходимо при каждой загрузке проекта DLL в IDE. Нельзя-ли как-нибудь навечно его прописать?


 
han_malign   (2003-10-22 16:39) [8]

> указывать путь к DLL необходимо при каждой загрузке
- в смысле?
Progect Options->Directories/Conditioanls ?
Tools->Environment Options->Preferences->Autosave options ?


 
LaidBack   (2003-10-22 16:51) [9]

Я имел ввиду, что путь к DLL не запоминается в Reload Symbol Table и поэтому при каждой загрузке проекта DLL приходится его муторно устанавливать.


 
ermserg   (2003-10-22 17:45) [10]

Tam po-moyemu est escho odno resheniye - nuzhno compilirovat DLL v folder host applicationa (naskolko ya pomnyu), togda vso raotayet bez Ctrl+Alt+M.


 
ermserg   (2003-10-22 17:48) [11]

Nashol:

SOLUTION A

Build your DLL to the same directory as the DPR file. If you just set
the "Output Directory" entry to be empty on the
Directories/Conditionals tab of the project options, then this will
automatically happen.

Either use this directory as your webserver"s scripts or isapi
directory, or move the DPR/DOF/CFG/RES files to your webserver"s
scripts or isapi directory. If you do the later through the Delphi
menu option File | Save Project As, the Delphi will fix up the
directories of your source files in the uses section of the DPR for
you. It is not necessary to move the PAS files.

That should be it. Build and debug happily ever after. The only
downside to this is that you have to either change your webserver
setup or move your project file to your scripts or isapi directory
which is a annoying if you are using a source control system and you
are the only one with this setup.

SOLUTION B

Before compiling, change the linking options of your project to
include Remote Debugging Symbols.

Before debugging, open a file (an empty text file will do) from the
directory your DLL is in. That directory will become the current
directory for Delphi. When you start debugging, Delphi will correctly
find your DLL and load its Symbol Table because it is in this
directory.

I don"t like this solution because you have to always make sure that
the directory your DLL is in always the current directory for Delphi
before debugging.

SOLUTION C

Before compiling, change the linking options of your project to
include Remote Debugging Symbols.

After you have started to debug, open the View | Debug Windows |
Modules dialog. Find the entry for your DLL. If this is an isapi
DLL, make sure you have made a request to the webserver so your DLL
will already be loaded, otherwise you won"t find it in this list.
Right click on your DLL and choose "Reload Symbol Table..." and enter
in the full path and filename for your DLL and click OK. This will
then properly load the Symbol Table.

A downside to this solution (other than you have to do it every time)
is that you can"t debug any code the executes when your DLL is first
loaded.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2003.11.03;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.48 MB
Время: 0.008 c
1-8499
Sergey_Masloff
2003-10-23 20:07
2003.11.03
Интересное поведение Delphi7 + Frames


6-8573
Ellik
2003-09-05 14:08
2003.11.03
Отправить E-mail, подцепив файл


4-8707
MadMag
2003-09-01 13:09
2003.11.03
не идет работа с ком портом из dll


9-8248
Shurik
2003-04-28 04:45
2003.11.03
Вопрос по TDXInput и DLL


1-8417
DProg
2003-10-22 09:53
2003.11.03
Вызов обработчика события из DLL в программу





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский