• Gem #122: Breakpoint Commands — Part 2

    In a previous Gem, a simple use case of breakpoint commands was provided to check some program properties at run time. This Gem extends this use case to show some of the expressive power of the Python API. Continue Reading »

    Jerome Guitton
    AdaCore
  • Gem #121 Breakpoint Commands—Part 1

    This gem will give a simple use case of breakpoint commands in GDB to check dynamically some properties of the debugged program. Continue Reading »

    Jerome Guitton
    AdaCore
  • Gem #120 : GDB Scripting—Part 2

    In the previous Gem we saw how GDB provides scripting capabilities through its macro-coding language, which allows customization of the debugger using the .gdbinit file. In this Gem, we explore more advanced features of GDB scripting. Continue Reading »

    Jean-Charles Delay
    AdaCore
  • Gem #119 : GDB Scripting—Part 1

    GDB, the GNU Project Debugger, is a powerful tool. General use includes basic CLI commands -- break, run, print, etc. -- but there is so much more you can do with it. One of those capabilities is scripting. Just as you have a .rc for your shell configuration, you can also add a .gdbinit for the debugger. This Gem describes some of the available features of GDB scripting and general customization with .gdbinit.

    Continue Reading »

    Jean-Charles Delay
    AdaCore
  • Gem #118: File-System Portability Issues and GNATCOLL.VFS

    This Gem discusses some portability issues related to file systems. In particular, it addresses matters of file names and dealing with case-sensitive vs. case-insensitive file systems, character sets, and symbolic links, and also gives an introduction to the utility package GNATCOLL.VFS.

    Continue Reading »

  • Gem #117: Design Pattern: Overridable Class Attributes in Ada 2012

    In this Gem we consider how to realize the capability of “class attributes” (such as supported in Python) using Ada. Continue Reading »

  • Gem #116: Ada and C++ Exceptions

    One of the main issues raised by interfacing Ada and C++ is propagation of exceptions from one environment to the other. In this Gem, we’ll demonstrate how the new exception mechanism implemented in GNAT allows catching Ada exceptions in C++, and vice versa. Note that the following code will work starting with GNAT Pro 7. Continue Reading »

    Quentin Ochem
    AdaCore
  • Gem #115: Lego Mindstorms Ada Environment — Part 2

    This series of Gems explores the GNAT Ada programming environment for the Lego Mindstorms robotics kit. The series examines the high- and low-level interfaces to the hardware, the language subset supported by the underlying run-time library, and how to use the environment effectively. We’ll examine other topics as well. This Gem introduces the basic steps of the Mindstorms hardware initialization and shutdown. Continue Reading »

    Pat Rogers
    AdaCore
  • Gem #114: Logging with GNATCOLL.Traces

    The GNAT Components Collection provides a package with facilities for logging information to various text files. Extra information can be output for each log, providing convenient ways to understand the behavior of an application when a debugger is not available. Continue Reading »

  • Gem #113: Visitor Pattern in Ada

    The visitor pattern is a design pattern that provides a way to execute specific methods on an object (the visitor) depending on the type of another object. Since the exact subprogram called depends on both types of the objects, this pattern is often called double dispatching. Continue Reading »

  • Gem #112: Lego Mindstorms Ada Environment—Part 1

    This series of Gems explores the GNAT Ada programming environment for the Lego Mindstorms robotics kit. The series will examine the high- and low-level interfaces to the hardware, the language subset supported by the underlying run-time library, and how to use the environment effectively. We’ll examine other topics as well. This first Gem introduces the general issue of the Ada language subset available to programmers and shows how the Ada interfaces address one specific aspect of that subset. Continue Reading »

    Pat Rogers
    AdaCore
  • Gem #111: The Distributed Systems Annex, Part 5—Embedded Name Server

    This is the fifth in a series of Gems introducing the facilities defined by the optional annex for Distributed Systems of the Ada Reference Manual (Annex E). In the previous installment, we showed how to integrate DSA code as a stand-alone Ada library in a C/C++ application.

    In this installment, we show how the DSA name server can be embedded in the main partition, rather than started as a stand-alone process.

    Continue Reading »

    Thomas Quinot
    AdaCore
  • Gem #110: Ada Plug-ins and Shared Libraries—Part 2

    In this Gem, we continue the discussion of GNAT's support for shared libraries and explain how to build Ada plug-ins. Continue Reading »

    Pascal Obry
    EDF R&D
  • Gem #109: Ada Plug-ins and Shared Libraries—Part 1

    In this Gem, we discuss GNAT's support for shared libraries as a prelude to understanding how to build Ada plug-ins. Continue Reading »

    Pascal Obry
    EDF R&D
  • Gem #108: Gprbuild and Configuration Files—Part 2

    In this second of a series of three Gems about gprbuild, we explain in more detail how to configure the tool, again with the help of configuration files.

    Continue Reading »

    Johannes Kanig
    AdaCore
  • Gem #107: Preventing Deallocation for Reference-counted Types

    This Gem was contributed by Ada Magica (C.K.W. Grein), as a followup to an earlier Gem. Christoph explores ways in which the API for reference-counted types can be made safer by taking advantage of some Ada 2005 features.

    Continue Reading »

    Ada Magica
    C.K.W. Grein
  • Gem #106: Lady Ada Kisses Python—Part 2

    This series of two Gems explains how to use the GNAT Components Collection to interface your Ada code with Python. The first Gem described what benefits this could bring to your application, and the difficulties there would be in interfacing directly to the Python library. The second Gem shows how to get started with GNATCOLL to make the interfacing much easier.

    Continue Reading »

  • Gem #105: Lady Ada Kisses Python—Part 1

    This series of two Gems explains how to use the GNAT Components Collection to interface your Ada code with Python. The first Gem describes the benefits this could bring to your application as well as the difficulties there would be in interfacing directly to the Python library. The second Gem will show how to get started with GNATCOLL to greatly simplify the interfacing process.

    Continue Reading »

  • Gem #104: Gprbuild and Configuration Files—Part 1

    In this first of a series of three Gems about configuration capabilities of gprbuild, we explain how to configure gprbuild to use a custom compiler, with the help of configuration files.

    Continue Reading »

    Johannes Kanig
    AdaCore
  • Gem #103: Code Archetypes for Real-Time Programming—Part 5

    In the programming of real-time systems, code that deals with concurrency and real-time often draws from explicit or implicit recurring patterns. It therefore is best factored out. In this series of Ada Gems, we illustrate a set of code pattern archetypes that are intended to ease the development of real-time systems.

    Continue Reading »

    Marco Panunzio
    University of Padua
« Previous    1  2  3  4  5     Next »