On another level: How to debug compiling query engines

Timo Kersten, Thomas Neumann

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

5 Scopus citations

Abstract

Compilation-based query engines generate and compile code at runtime, which is then run to get the query result. In this process there are two levels of source code involved: The code of the code generator itself and the code that is generated at runtime. This can make debugging quite indirect, as a fault in the generated code was caused by an error in the generator. To find the error, we have to look at both, the generated code and the code that generated it. Current debugging technology is not equipped to handle this situation. For example, GNU's gdb only offers facilities to inspect one source line, but not multiple source levels. Also, current debuggers are not able to reconstruct additional program state for further source levels, thus, context is missing during debugging. In this paper, we show how to build a multi-level debugger for generated queries that solves these issues.We propose to use a timetravelling debugger to provide context information for compile-time and runtime, thus providing full interactive debugging capabilities for every source level.We also present how to build such a debugger with low engineering effort by combining existing tool chains.

Original languageEnglish
Title of host publicationProceedings of the Workshop on Testing Database Systems, DBTest 2020
PublisherAssociation for Computing Machinery, Inc
ISBN (Electronic)9781450380010
DOIs
StatePublished - 19 Jun 2020
Event2020 Workshop on Testing Database Systems, DBTest 2020 - Portland, United States
Duration: 19 Jun 202019 Jun 2020

Publication series

NameProceedings of the Workshop on Testing Database Systems, DBTest 2020

Conference

Conference2020 Workshop on Testing Database Systems, DBTest 2020
Country/TerritoryUnited States
CityPortland
Period19/06/2019/06/20

Keywords

  • code generation
  • debugging
  • relational query execution

Fingerprint

Dive into the research topics of 'On another level: How to debug compiling query engines'. Together they form a unique fingerprint.

Cite this