Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A remedy to #217 #221

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ vogl_build/*
voglinc/
*~
*.swp
\#*
.\#*
*.a
*.bin

_out*/
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_subdirectory(src/libbacktrace) # 10
add_subdirectory(src/libbacktrace_test) # 11
endif()

6 changes: 6 additions & 0 deletions src/glxspheres/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
6 changes: 6 additions & 0 deletions src/ktxtool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
7 changes: 7 additions & 0 deletions src/voglbench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ target_link_libraries(${PROJECT_NAME}
)

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
6 changes: 6 additions & 0 deletions src/voglcmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
7 changes: 7 additions & 0 deletions src/vogleditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,10 @@ if (MSVC)
endif()

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
2 changes: 1 addition & 1 deletion src/vogleditor/vogleditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ VoglEditor::Prompt_Result VoglEditor::prompt_generate_trace()
#endif

QString cmdLine = m_pLaunchTracerDialog->get_command_line();
QProcessEnvironment env = m_pLaunchTracerDialog->get_process_environment();
QProcessEnvironment env = m_pLaunchTracerDialog->get_process_environment (sizeof (void *) < 8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it's particularly common, but this means a 64-bit vogleditor could not launch and trace a 32-bit application, because you're only going to inject the 64-bit tracer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. The problem is, leaving this as-is was breaking the tracing in my case.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The true answer to this question, IMO, is figuring out how to build a separate, 32-bit tracer using Nix.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plohrmann, I have addressed your suggestion (I think)

bool bSuccess = launch_application_to_generate_trace(cmdLine, env);
QFileInfo fileInfo(m_pLaunchTracerDialog->get_trace_file_path());
if (bSuccess && fileInfo.exists())
Expand Down
4 changes: 2 additions & 2 deletions src/vogleditor/vogleditor_qapicalltreemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ bool vogleditor_QApiCallTreeModel::init(vogl_trace_file_reader *pTrace_reader)
{
QString msg(QString("*** Information: unpaired \"") + QString(g_vogl_entrypoint_descs[entrypoint_id].m_pName) + QString("\"."));
vogleditor_output_message(msg.toStdString().c_str());
vogl_printf(msg.toStdString().c_str());
vogl_printf("%s", msg.toStdString().c_str());
vogl_printf("\n");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be merged with the previous line "%s\n"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgerhardy, done

}
}
Expand Down Expand Up @@ -387,7 +387,7 @@ bool vogleditor_QApiCallTreeModel::init(vogl_trace_file_reader *pTrace_reader)
{
QString msg(QString("*** Information: unpaired \"") + QString(g_vogl_entrypoint_descs[entrypoint_id].m_pName) + QString("\"."));
vogleditor_output_message(msg.toStdString().c_str());
vogl_printf(msg.toStdString().c_str());
vogl_printf("%s", msg.toStdString().c_str());
vogl_printf("\n");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/vogleditor/vogleditor_qlaunchtracerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ QString vogleditor_QLaunchTracerDialog::get_command_line()
return cmdline;
}

QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment()
QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment(bool just32bits)
{
QDir appDirectory(QCoreApplication::applicationDirPath());

Expand Down Expand Up @@ -119,9 +119,7 @@ QProcessEnvironment vogleditor_QLaunchTracerDialog::get_process_environment()
m_process_environment.insert("VOGL_CMD_LINE", VOGL_CMD_LINE);
}

QString libvogltrace32 = appDirectory.absoluteFilePath("./libvogltrace32.so");
QString libvogltrace64 = appDirectory.absoluteFilePath("./libvogltrace64.so");
QString LD_PRELOAD = libvogltrace32 + ":" + libvogltrace64;
QString LD_PRELOAD = appDirectory.absoluteFilePath(just32bits ? "./libvogltrace32.so" : "./libvogltrace64.so");

if (getenv("LD_PRELOAD"))
{
Expand Down
2 changes: 1 addition & 1 deletion src/vogleditor/vogleditor_qlaunchtracerdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class vogleditor_QLaunchTracerDialog : public QDialog

QString get_application_to_launch();
QString get_command_line();
QProcessEnvironment get_process_environment();
QProcessEnvironment get_process_environment(bool just32bits);
QString get_trace_file_path();

private
Expand Down
6 changes: 6 additions & 0 deletions src/voglgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,9 @@ endif()

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
6 changes: 6 additions & 0 deletions src/voglreplay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
6 changes: 6 additions & 0 deletions src/voglserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
6 changes: 6 additions & 0 deletions src/vogltest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ target_link_libraries(${PROJECT_NAME}

build_options_finalize()

#
# Installation
#
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib)
5 changes: 5 additions & 0 deletions src/vogltrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ endif()

build_options_finalize()

#
# Installation
#
install(TARGETS vogltrace
LIBRARY DESTINATION bin)